]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/pw.c
Move the quiet flag into the configuration structure
[pw-darwin.git] / pw / pw.c
diff --git a/pw/pw.c b/pw/pw.c
index 6769738fbe30c2d79f1300427e2d66eb17feef34..951abc6a0b0af5c08fc1e6557b418c9fcf43408e 100644 (file)
--- 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);
 
        /*