summaryrefslogtreecommitdiffstats
path: root/pw/pw.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-07-11 17:01:08 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-07-11 17:01:08 +0000
commit61485a50fb8b4a5d9adcc7b71c2a6df7109f76b8 (patch)
tree8f675e2ebc44a10a158a640d774aca39c4e76491 /pw/pw.c
parent5809c6a767c19d9ce6cca88efbcd54a6f19b5ce8 (diff)
downloadpw-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pw/pw.c b/pw/pw.c
index 6769738..951abc6 100644
--- a/pw/pw.c
+++ b/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);
/*