diff options
author | Rob Landley <rob@landley.net> | 2015-01-14 00:31:06 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-01-14 00:31:06 -0600 |
commit | 698a160868dba71766a8607b72a07eaa63d74da4 (patch) | |
tree | b0e770249d776680ea5277e645449ea6c3049e63 /toys/posix | |
parent | 9d66c41d1d2c4ebbd4e7034145bf0143fa5e08b9 (diff) | |
download | toybox-698a160868dba71766a8607b72a07eaa63d74da4.tar.gz |
Let chown build standalone.
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/chgrp.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/toys/posix/chgrp.c b/toys/posix/chgrp.c index f573add4..dc7741bc 100644 --- a/toys/posix/chgrp.c +++ b/toys/posix/chgrp.c @@ -4,20 +4,17 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/chown.html * See http://opengroup.org/onlinepubs/9699919799/utilities/chgrp.html - * - * TODO: group only one of [HLP] -USE_CHGRP(NEWTOY(chgrp, "<2hPLHRfv", TOYFLAG_BIN)) -USE_CHGRP(OLDTOY(chown, chgrp, TOYFLAG_BIN)) +USE_CHGRP(NEWTOY(chgrp, "<2hPLHRfv[-HLP]", TOYFLAG_BIN)) +USE_CHOWN(OLDTOY(chown, chgrp, TOYFLAG_BIN)) config CHGRP - bool "chgrp/chown" + bool "chgrp" default y help - usage: chown [-RHLP] [-fvh] [owner][:group] file... - usage: chgrp [-RHLP] [-fvh] group file... + usage: chgrp/chown [-RHLP] [-fvh] group file... - Change ownership of one or more files. + Change group of one or more files. -f suppress most error messages. -h change symlinks instead of what they point to @@ -26,9 +23,16 @@ config CHGRP -L with -R change target of symlink, follow all symlinks -P with -R change symlink, do not follow symlinks (default) -v verbose output. + +config CHOWN + bool "chown" + default y + help + see: chgrp */ #define FOR_chgrp +#define FORCE_FLAGS #include "toys.h" GLOBALS( @@ -109,3 +113,8 @@ void chgrp_main(void) if (CFG_TOYBOX_FREE && ischown) free(own); } + +void chown_main() +{ + chgrp_main(); +} |