tBe quiet by default. Replaced -q with -v - wendy - watch files/directories and run commands on any event
 (HTM) git clone git://z3bra.org/wendy
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 555a55c468d7289bcb463170e16566306206091c
 (DIR) parent 9694ba357135dfabe794d4e47c0e676ee9fbbdf0
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Wed, 16 Jul 2014 08:30:49 +0200
       
       Be quiet by default. Replaced -q with -v
       
       Diffstat:
         M wendy.c                             |      15 +++++++--------
       
       1 file changed, 7 insertions(+), 8 deletions(-)
       ---
 (DIR) diff --git a/wendy.c b/wendy.c
       t@@ -43,7 +43,7 @@ usage()
                  "\t-l           : list events mask values\n"
                  "\t-f file      : file to watch (everything is a file)\n"
                  "\t-t timeout   : time between event check (in seconds)\n"
       -          "\t-q           : don't talk to me, program\n"
       +          "\t-v           : talk to me, program\n"
                  "\t-e command   : command to launch (must be the last argument!)\n",
                 stdout);
            exit(1);
       t@@ -99,7 +99,7 @@ execvpe(const char *program, char **argv, char **envp)
        int
        main (int argc, char **argv)
        {
       -    int  fd, wd, len, i = 0, timeout = 0, ignore = 0, quiet = 0;
       +    int  fd, wd, len, i = 0, timeout = 0, ignore = 0, verbose = 0;
            uint32_t mask = 0;
            char buf[BUF_LEN];
            char *file = NULL, **cmd = NULL;
       t@@ -115,7 +115,7 @@ main (int argc, char **argv)
                    case 'M': mask |= IN_MODIFY; break;
                    case 'm': mask |= atoi(argv[++i]); break;
                    case 'l': list_events(); break;
       -            case 'q': quiet = 1; break;
       +            case 'v': verbose += 1; break;
                    case 'f': file = argv[++i]; break;
                    case 't': timeout = atoi(argv[++i]); break;
                    case 'e': cmd = &argv[++i]; ignore=1; break;
       t@@ -141,7 +141,7 @@ add_watch:
                exit(1);
            }
        
       -    if (!quiet) {
       +    if (verbose) {
                printf( "watching file %s with event mask %u\n", file, mask);
            }
        
       t@@ -168,13 +168,12 @@ add_watch:
                        goto add_watch;
                    }
        
       -            if (!quiet) {
       -                printf("event on file %s: %u\n",
       -                        ev->len ? ev->name : file, ev->mask);
       +            if (verbose) {
       +                printf("%u: %s\n", ev->mask, ev->len ? ev->name : file);
                    }
        
                    /*
       -             * do not do anything if no command given.
       +             * Do not do anything if no command given.
                     * Also only execute the command if the file concerned by the event
                     * is the one we're watching, or if we're not looking for a specific
                     * file.