Re: [Toybox] More find cleanup

2013-04-21 Thread Rob Landley
On 04/20/2013 01:39:10 PM, Felix Janda wrote: Hello, some more find cleanup in an attached patch. The main change was to make some code in build_filter_list() less repetitive using a suitable struct and a loop. Huh, it didn't complain building defconfig. (Presumably because it's a pointer

Re: [Toybox] More find cleanup

2013-04-21 Thread Felix Janda
On 04/21/13 at 12:38pm, Rob Landley wrote: On 04/20/2013 01:39:10 PM, Felix Janda wrote: Hello, some more find cleanup in an attached patch. The main change was to make some code in build_filter_list() less repetitive using a suitable struct and a loop. Problem: you defined a

Re: [Toybox] [CLEANUP] stat: Some cleanup

2013-04-21 Thread Felix Janda
On 04/21/13 at 12:09am, Rob Landley wrote: On 04/19/2013 05:28:27 PM, Felix Janda wrote: [snip] The functionality of get_access_str() is also implemented in the ls toy (likely much better). Should something like it be in the library? Once code can be shared by a second command,

[Toybox] Yet more find cleanup

2013-04-21 Thread Felix Janda
A little more cleanup in an attached patch. -exec does only record whether the exit status of the command is zero or not. Some unnecessary use of stat could be removed. (The dirtree functions already do a stat and save its results.) If no action is found make the command exactly behave as if

Re: [Toybox] [CLEANUP] stat: Some cleanup

2013-04-21 Thread Rob Landley
On 04/21/2013 04:40:16 PM, Felix Janda wrote: If you can come up with a clean way to share the code, go for it. Ok, actually I'd only put something like get_access_str() of stat into the lib. Cool. Although a quick glance at the one in stat implies it doesn't handle the fun combinations of