remove whitespaces in imagetag tool
SVN-Revision: 21848
This commit is contained in:
parent
d6ef217a9f
commit
e79f259abf
1 changed files with 7 additions and 7 deletions
|
@ -94,7 +94,7 @@ uint32_t compute_crc32(uint32_t crc, FILE *binfile, size_t compute_start, size_t
|
||||||
size_t read;
|
size_t read;
|
||||||
|
|
||||||
fseek(binfile, compute_start, SEEK_SET);
|
fseek(binfile, compute_start, SEEK_SET);
|
||||||
|
|
||||||
/* read block of 1024 bytes */
|
/* read block of 1024 bytes */
|
||||||
while (binfile && !feof(binfile) && !ferror(binfile) && (compute_len >= sizeof(readbuf))) {
|
while (binfile && !feof(binfile) && !ferror(binfile) && (compute_len >= sizeof(readbuf))) {
|
||||||
read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), binfile);
|
read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), binfile);
|
||||||
|
@ -221,7 +221,7 @@ int tagfile(const char *kernel, const char *rootfs, const char *bin,
|
||||||
printf("Data alignment to %dk with 'deadc0de' appended\n", flash_bs/1024);
|
printf("Data alignment to %dk with 'deadc0de' appended\n", flash_bs/1024);
|
||||||
fseek(binfile, rootfsoff + rootfslen - fwaddr, SEEK_SET);
|
fseek(binfile, rootfsoff + rootfslen - fwaddr, SEEK_SET);
|
||||||
fwrite(&deadcode, sizeof(uint32_t), 1, binfile);
|
fwrite(&deadcode, sizeof(uint32_t), 1, binfile);
|
||||||
|
|
||||||
/* Flush the binfile buffer so that when we read from file, it contains
|
/* Flush the binfile buffer so that when we read from file, it contains
|
||||||
* everything in the buffer
|
* everything in the buffer
|
||||||
*/
|
*/
|
||||||
|
@ -243,7 +243,7 @@ int tagfile(const char *kernel, const char *rootfs, const char *bin,
|
||||||
* needs to be rootfs + deadcode
|
* needs to be rootfs + deadcode
|
||||||
*/
|
*/
|
||||||
rootfscrc = compute_crc32(rootfscrc, binfile, kerneloff - fwaddr, rootfslen + sizeof(deadcode));
|
rootfscrc = compute_crc32(rootfscrc, binfile, kerneloff - fwaddr, rootfslen + sizeof(deadcode));
|
||||||
|
|
||||||
/* Close the files */
|
/* Close the files */
|
||||||
fclose(kernelfile);
|
fclose(kernelfile);
|
||||||
fclose(rootfsfile);
|
fclose(rootfsfile);
|
||||||
|
@ -306,7 +306,7 @@ int main(int argc, char **argv)
|
||||||
uint32_t flashstart, fwoffset, loadaddr, entry;
|
uint32_t flashstart, fwoffset, loadaddr, entry;
|
||||||
uint32_t fwaddr, flash_bs;
|
uint32_t fwaddr, flash_bs;
|
||||||
int tagidfound = 0;
|
int tagidfound = 0;
|
||||||
|
|
||||||
kernel = rootfs = bin = boardid = chipid = magic2 = ver = rsignature = layoutver = NULL;
|
kernel = rootfs = bin = boardid = chipid = magic2 = ver = rsignature = layoutver = NULL;
|
||||||
entry = 0;
|
entry = 0;
|
||||||
|
|
||||||
|
@ -394,11 +394,11 @@ int main(int argc, char **argv)
|
||||||
fprintf(stderr, "You need to specify the kernel entry (-e)\n");
|
fprintf(stderr, "You need to specify the kernel entry (-e)\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fallback to defaults */
|
/* Fallback to defaults */
|
||||||
|
|
||||||
fwaddr = flashstart + fwoffset;
|
fwaddr = flashstart + fwoffset;
|
||||||
|
|
||||||
if (!magic2) {
|
if (!magic2) {
|
||||||
magic2 = malloc(sizeof(char) * 14);
|
magic2 = malloc(sizeof(char) * 14);
|
||||||
if (!magic2) {
|
if (!magic2) {
|
||||||
|
@ -416,7 +416,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
strcpy(ver, IMAGETAG_VER);
|
strcpy(ver, IMAGETAG_VER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return tagfile(kernel, rootfs, bin, boardid, chipid, fwaddr, loadaddr, entry, ver, magic2, flash_bs, rsignature, layoutver);
|
return tagfile(kernel, rootfs, bin, boardid, chipid, fwaddr, loadaddr, entry, ver, magic2, flash_bs, rsignature, layoutver);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue