diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-07 21:57:20 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-06-07 21:57:20 +0000 |
| commit | 44a564bd4185ea1e172a8f310d13f71f24abf73f (patch) | |
| tree | 783b2a888312a7cd12a09886e65419f79bf28825 /pw/pw_user.c | |
| parent | 50b3230917e6e4c6538d6d0f01fed543b8be5efc (diff) | |
| download | pw-darwin-44a564bd4185ea1e172a8f310d13f71f24abf73f.tar.gz pw-darwin-44a564bd4185ea1e172a8f310d13f71f24abf73f.zip | |
Remove '-q' support for pw [user|group] next
the intent of -q in this command is to return as exit status the value of the
next group/user id, which does not make sense given exit status are limited to
values between 0 and 255.
Diffstat (limited to 'pw/pw_user.c')
| -rw-r--r-- | pw/pw_user.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c index c3b2751..ea3cb3d 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -158,14 +158,10 @@ pw_user(int mode, char *name, long id, struct cargs * args) * With M_NEXT, we only need to return the * next uid to stdout */ - if (mode == M_NEXT) - { - uid_t next = pw_uidpolicy(cnf, id); - if (getarg(args, 'q')) - return next; - printf("%u:", next); + if (mode == M_NEXT) { + printf("%u:", pw_uidpolicy(cnf, id)); pw_group(mode, name, -1, args); - return EXIT_SUCCESS; + return (EXIT_SUCCESS); } /* |
