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 | ecf012ac29ba3e82e8b5e497ee1b80629ae5624f (patch) | |
| tree | f34db7c3923afd03edab098b4fcd6982a6056123 /pw/pw.c | |
| parent | bc539790827cbc69585a6ec393f04705e5825eff (diff) | |
| download | pw-darwin-ecf012ac29ba3e82e8b5e497ee1b80629ae5624f.tar.gz pw-darwin-ecf012ac29ba3e82e8b5e497ee1b80629ae5624f.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); /* |
