summaryrefslogtreecommitdiff
path: root/coreutils/chgrp.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-09-24 03:22:57 +0000
committerGlenn L McGrath2003-09-24 03:22:57 +0000
commiteebcc1d98a9901ff69ffb97ba99bccd36666000f (patch)
treead1e21191b4aef5ff0c0fa9c30717e77d023cc5d /coreutils/chgrp.c
parentd72e34c7524a947ba004afff91272c27549b3085 (diff)
downloadbusybox-eebcc1d98a9901ff69ffb97ba99bccd36666000f.zip
busybox-eebcc1d98a9901ff69ffb97ba99bccd36666000f.tar.gz
Add the "install" applet, move get_ug_id to libbb as its used by chown,
chgrp and install.
Diffstat (limited to 'coreutils/chgrp.c')
-rw-r--r--coreutils/chgrp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 2f3fa41..8c969d7 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -59,10 +59,7 @@ int chgrp_main(int argc, char **argv)
argv += optind;
/* Find the selected group */
- gid = strtoul(*argv, &p, 10); /* maybe it's already numeric */
- if (*p || (p == *argv)) { /* trailing chars or nonnumeric */
- gid = my_getgrnam(*argv);
- }
+ gid = get_ug_id(*argv, my_getgrnam);
++argv;
/* Ok, ready to do the deed now */