diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-11 17:01:08 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-11 17:01:08 +0000 |
commit | 61485a50fb8b4a5d9adcc7b71c2a6df7109f76b8 (patch) | |
tree | 8f675e2ebc44a10a158a640d774aca39c4e76491 /pw/pw.c | |
parent | 5809c6a767c19d9ce6cca88efbcd54a6f19b5ce8 (diff) | |
download | pw-darwin-61485a50fb8b4a5d9adcc7b71c2a6df7109f76b8.tar.gz pw-darwin-61485a50fb8b4a5d9adcc7b71c2a6df7109f76b8.tar.zst pw-darwin-61485a50fb8b4a5d9adcc7b71c2a6df7109f76b8.zip |
Move the quiet flag into the configuration structure
Diffstat (limited to 'pw/pw.c')
-rw-r--r-- | pw/pw.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); /* |