i see to reflect the date change the file is copied to jffs.. makes sense, so 
the touch alone is more expensive due to the nature of the overlaying fs :) .. 
thanks ede

On 15.02.2011 12:50, Peter Wagner wrote:
> no its not about what is more expensive but someone in the development 
> channel 
> ment, that a touch on a squashfs with jffs overlay will create a new file on 
> the jffs overlay even when the file existed on the squashfs partition...
> 
> Am Dienstag, 15. Februar 2011, 11:20:47 schrieb edgar.sol...@web.de:
>> On 15.02.2011 11:13, Ferenc Wagner wrote:
>>> Peter Wagner <tripo...@gmx.at> writes:
>>>> -       [ -n "$leasefile" ] && [ -e "$leasefile" ] || touch "$leasefile"
>>>> +       [ -n "$leasefile" ] && ( [ -e "$leasefile" ] || touch
>>>> "$leasefile" )
>>>
>>> Looks like this is fixed already by commit 15fba44a (but see point 6 of
>>> http://mywiki.wooledge.org/BashPitfalls and the rest for an interesting
>>> read) so the following is academic, but I typed it before checking...
>>>
>>> It's cheeper to use braces in such cases to avoid subshell creation:
>>>           [ -n "$leasefile" ] && { [ -e "$leasefile" ] || touch
>>>           "$leasefile"; }
>>
>> command grouping is the way to go, right
>>
>>> Btw. is the -e test really necessary?  Why not simply
>>>
>>>           [ -n "$leasefile" ] && touch "$leasefile"
>>>
>>> ?
>>
>> depends on what is more expensive .. the test or the touch, but i doubt the
>> research is worth the effective result.
>>
>> ede
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to