[Toybox] fliddling with chgrp.

Georgi Chorbadzhiyski gf at unixsol.org
Sun May 20 04:53:48 PDT 2012


On 5/20/12 6:47 AM, Rob Landley wrote:
> 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...

Sounds OK, it is good to see some progress. Could you look at
logger? It should be self contained and depends on nothing.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

 1337514828.0


More information about the Toybox mailing list