diff options
Diffstat (limited to 'usr.sbin/pw/pw_group.c')
-rw-r--r-- | usr.sbin/pw/pw_group.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c index daa121d..b9cce0d 100644 --- a/usr.sbin/pw/pw_group.c +++ b/usr.sbin/pw/pw_group.c @@ -73,8 +73,11 @@ pw_group(int mode, char *name, long id, struct cargs * args) * next gid to stdout */ if (mode == M_NEXT) { - printf("%u\n", gr_gidpolicy(cnf, id)); - return (EXIT_SUCCESS); + gid_t next = gr_gidpolicy(cnf, id); + if (getarg(args, 'q')) + return next; + printf("%u\n", next); + return EXIT_SUCCESS; } if (mode == M_PRINT && getarg(args, 'a')) { |