Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-10-16 21:11:38 (GMT)
committer Daniel Drake <dsd@laptop.org>2012-10-16 21:12:04 (GMT)
commitd6ec465cd85b4ecf3efdeb937804e8153348b8f2 (patch)
tree298c6069aed3483378e8aa0fbebf6ddb505d4611
parent2ced5a7b019ca2afe25afdedd78cbeb44b085100 (diff)
Revert "zhashfs, add header data for sanity-check of file size, #12055"
This reverts commit 32d7015ac1b6287f3e1dae4b84c056e625643edd. This design/implementation was found to be incompatible with secure fs-update with old (shipped) firmware versions.
-rw-r--r--bin/zhashfs.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/bin/zhashfs.c b/bin/zhashfs.c
index b85de95..9832f31 100644
--- a/bin/zhashfs.c
+++ b/bin/zhashfs.c
@@ -165,8 +165,6 @@ int main(int argc, char **argv)
FILE *infile;
long i;
off_t insize;
- off_t outsizepos, zsizepos, lastpos;
- char *sizefmt;
int readlen;
int skip;
@@ -238,11 +236,6 @@ int main(int argc, char **argv)
++fname;
fprintf(outfile, "data: %s\n", fname);
- outsizepos = ftello(outfile);
- zsizepos = ftello(zfile);
- sizefmt = "[ifdef] size: size: %12.12lx [then]\n";
- fprintf(outfile, sizefmt, 0);
- fprintf(zfile, sizefmt, 0);
fprintf(outfile, "zblocks: %lx %lx\n", zblocksize, eblocks);
fprintf(zfile, "zblocks: %lx %lx\n", zblocksize, eblocks);
@@ -273,20 +266,9 @@ int main(int argc, char **argv)
fprintf(outfile, "zblocks-end:\n");
fprintf(zfile, "zblocks-end:\n");
- lastpos = ftello(zfile);
-
- /* go back and rewrite zdata size line, now that it is known */
- (void)fseeko(outfile, outsizepos, SEEK_SET);
- fprintf(outfile, sizefmt, lastpos);
- (void)fseeko(outfile, lastpos, SEEK_SET);
-
- (void)fseeko(zfile, zsizepos, SEEK_SET);
- fprintf(zfile, sizefmt, lastpos);
- (void)fseeko(zfile, lastpos, SEEK_SET);
-
fclose(infile);
fclose(outfile);
- putchar('\n');
+ putchar('\n');
return EXIT_SUCCESS;
}