Hi, I wanted to ping someone to apply this very small patch which fixes sysupgrade so that backup and restore of data across a flashing of the firmware (i.e. automatic saving of specified configuration before flashing, and then restoring automatically on firstboot), works.
The bug was that the full DEADC0DE marker wasn't being checked for in the code that was supposed to write the file containing the configuration backup to the new JFFS portion of the firmware during the flash process. The attached patch replaces the erroneous size(JFFS_EOF) -1) with sizeof(JFFS_EOF). It is tested and works. -- 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://cshore.is-a-geek.com
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