I needed to adjust chgrp to work with the new dirtree, and I'm doing a
few cleanups along the way.

1) error_exit() prints an error message to stderr and then exits with an
error: if toys.exitval is 0 it sets it to 1, otherwise it uses it as the
exit value.

2) The difference between error_msg() and perror_message() (and
error_exit() and perror_exit()) is that the p versions append
strerror(errno).  This doesn't seem like what you wanted there.

3) you have:

  if (FLAG_R) for(blah) stuff1;
  else for(blah) stuff2;

Refactored as:

  for (blah) if (FLAG_R) stuff 1: else stuff2;

And some simplifications fell out of that...

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to