From eebcc1d98a9901ff69ffb97ba99bccd36666000f Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Wed, 24 Sep 2003 03:22:57 +0000 Subject: Add the "install" applet, move get_ug_id to libbb as its used by chown, chgrp and install. --- coreutils/chgrp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'coreutils/chgrp.c') diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 2f3fa4197..8c969d7b6 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 */ -- cgit v1.2.3