Daniel Dickinson wrote: > Ticket #5652 now contains a patch, attached here, to fix the following: > > sysupgrade save the configuration in sysupgrade.tgz but that file never > gets restored on reboot after flashing a new firmware image, so > configuration changes are always lost across firmware upgrades. > > The attached patch fixes the offending failing component which is mtd > -j. It was a simple C coding error in with sizeof(#define) was taken > when sizeof returns the size of a type not an object. Since the #define > was a byte string the size was 1 instead of 4 (the length of the JFFS2 > DEADC0DE marker). I replace sizeof with another define for the length > of the marker. The patch looks wrong to me. sizeof on a constant string should return its length + 1 (for the null byte). In your patch however you use a length value of 3, which doesn't make any sense. Are you really sure that in your case it substitutes the sizeof expression with a value of 1 or is this a guess?
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel