From ab96005684675240c7afc36c3547dfd4bfb99f23 Mon Sep 17 00:00:00 2001 From: bug1 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. git-svn-id: svn://busybox.net/trunk/busybox@7557 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- 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-55-g6feb