On Tue, 11 Aug 2009 03:18:58 +0200 Felix Fietkau <n...@openwrt.org> wrote:
> Are you really sure that in your case it substitutes the sizeof > expression with a value of 1 or is this a guess? With your reminder of sizeof on constant arrays, I was able to find the true offender and now the patch affects exactly one line of mtd.c. With this patch sysupgrade is able to save the configuration during firmware flash for restoring after rebooting. -- And that's my crabbing done for the day. Got it out of the way early, now I have the rest of the afternoon to sniff fragrant tea-roses or strangle cute bunnies or something. -- Michael Devore GnuPG Key Fingerprint 86 F5 81 A5 D4 2E 1F 1C http://gnupg.org The C Shore (Daniel Dickinson's Website) http://www.bmts.com/~cshore
Index: package/mtd/src/mtd.c =================================================================== --- package/mtd/src/mtd.c (revision 17236) +++ package/mtd/src/mtd.c (working copy) @@ -285,7 +285,7 @@ break; if (jffs2file) { - if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF)) == 0) { + if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF) - 1) == 0) { if (!quiet) fprintf(stderr, "\b\b\b "); if (quiet < 2)
signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel