Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-12 Thread Daniel Dickinson
On Tue, 11 Aug 2009 03:18:58 +0200 Felix Fietkau 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

Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-10 Thread Daniel Dickinson
On Tue, 11 Aug 2009 03:18:58 +0200 Felix Fietkau wrote: > Daniel Dickinson wrote: > > Ticket #5652 now contains a patch, attached here, to fix the > > following: The updated patch is below. > The patch looks wrong to me. sizeof on a constant string should return > its length + 1 (for the null b

Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-10 Thread Daniel Dickinson
On Tue, 11 Aug 2009 00:47:33 -0400 Daniel Dickinson wrote: > On Tue, 11 Aug 2009 03:18:58 +0200 > Felix Fietkau wrote: > > > 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 > > I'm pretty sure th

Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-10 Thread Daniel Dickinson
On Tue, 11 Aug 2009 03:18:58 +0200 Felix Fietkau wrote: > 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 I'm pretty sure that's not true. sizeof is the sizeof a type, in this case char. I remember tha

Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-10 Thread Daniel Dickinson
On Tue, 11 Aug 2009 03:18:58 +0200 Felix Fietkau wrote: > 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 firmw

Re: [OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-10 Thread Felix Fietkau
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 up

[OpenWrt-Devel] [PATCH] Fix sysupgrade save configuration

2009-08-09 Thread Daniel Dickinson
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