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 | 81b2ca9d3cd92e908e6c7b81a98fd399546829c0 (patch) | |
| tree | b50fb15b9c9582c914d98164bfac1c915c6913fc /pw/pw_user.c | |
| parent | 223ef3394cf724477520e801c506e253c3223c7d (diff) | |
| download | pw-darwin-81b2ca9d3cd92e908e6c7b81a98fd399546829c0.tar.gz pw-darwin-81b2ca9d3cd92e908e6c7b81a98fd399546829c0.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); } /* |
