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 [email protected]:
> On 15.02.2011 11:13, Ferenc Wagner wrote:
> > Peter Wagner <[email protected]> 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
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to