diff options
author | bapt <bapt@FreeBSD.org> | 2015-07-11 17:01:08 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-07-11 17:01:08 +0000 |
commit | 45674912578ba1480166b5c9537c35fb30123083 (patch) | |
tree | 4d647d53d630bc678cccc24bbbb9f7df51a934a8 /usr.sbin/pw/pw.c | |
parent | 032c1600ece5fbb82f126701974fc66146ebbf24 (diff) | |
download | FreeBSD-src-45674912578ba1480166b5c9537c35fb30123083.zip FreeBSD-src-45674912578ba1480166b5c9537c35fb30123083.tar.gz |
Move the quiet flag into the configuration structure
Diffstat (limited to 'usr.sbin/pw/pw.c')
-rw-r--r-- | usr.sbin/pw/pw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index 6769738..951abc6 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -314,6 +314,9 @@ main(int argc, char *argv[]) case 'o': conf.checkduplicate = true; break; + case 'q': + conf.quiet = true; + break; default: addarg(&arglist, ch, optarg); break; @@ -334,7 +337,7 @@ main(int argc, char *argv[]) * We should immediately look for the -q 'quiet' switch so that we * don't bother with extraneous errors */ - if (getarg(&arglist, 'q') != NULL) + if (conf.quiet) freopen(_PATH_DEVNULL, "w", stderr); /* |