[Toybox] Yet more find cleanup
Felix Janda
felix.janda at posteo.de
Sun Apr 21 15:06:38 PDT 2013
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 the operand
expression was in brackets and a "-print" was added to the end.
Previously the code for "-print" was at two places.
In the beginning of find.c there is a comment
/* To Do:
* -exec action
*/
"-exec [...] ;" seems to be implemented. Then at the end there is also a
comment
void find_main(void)
{
/* parse filters, if present */
build_filter_list();
/* FIXTHIS - parse actions, if present */
dirtree_read(TT.dir, check_node_callback);
}
That seems to be obsolete (or I don't understand it at all).
Felix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-cleanup.patch
Type: text/x-patch
Size: 4015 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130422/242f6338/attachment-0007.bin>
More information about the Toybox
mailing list