]> granicus.if.org Git - file/commitdiff
exit code non-zero for case of "no files and no -f".
authorIan Darwin <ian@darwinsys.com>
Wed, 23 Mar 1988 11:42:16 +0000 (11:42 +0000)
committerIan Darwin <ian@darwinsys.com>
Wed, 23 Mar 1988 11:42:16 +0000 (11:42 +0000)
src/file.c

index 929c19a9dac40b52b7aff9f24c54a720d9fc7ca7..2403867b5543ee8b999c7fc436c68832f4755005 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef        lint
 static char *moduleid = 
-       "@(#)$Header: /home/glen/git/file/cvs/file/src/file.c,v 1.14 1987/11/12 13:11:06 ian Exp $";
+       "@(#)$Header: /home/glen/git/file/cvs/file/src/file.c,v 1.15 1988/03/23 11:42:16 ian Exp $";
 #endif /* lint */
 extern char *ckfmsg;
 int    debug = 0,      /* huh? */
@@ -97,8 +97,10 @@ char *argv[];
                exit(ret);
 
        if (optind == argc) {
-               if (!didsomefiles)
+               if (!didsomefiles) {
                        (void)fprintf(stderr, USAGE, progname);
+                       exit(2);
+               }
        }
        else
                for (; optind < argc; optind++)