]> Zhao Yanbai Git Server - minix.git/commitdiff
fix rm -f
authorJoseph Koshy <jkoshy@users.sourceforge.net>
Fri, 25 Nov 2011 16:20:33 +0000 (21:50 +0530)
committerArun Thomas <arun@minix3.org>
Fri, 25 Nov 2011 16:49:09 +0000 (17:49 +0100)
    "/bin/rm" should not issue a usage message if the "-f" option was
    specified.

commands/cp/cp.c

index f29e7838965cd747e7d9d33bfffd0a03b63c7647..75cf43107401e8bb2e81880617bac2729ac4507b 100644 (file)
@@ -1320,7 +1320,11 @@ int main(int argc, char **argv)
 
     switch (action) {
     case REMOVE:
-       if (i == argc) usage();
+       if (i == argc) {
+           if (fflag)
+               exit(0);
+           usage();
+       }
        break;
     case LINK:
        /* 'ln dir/file' is to be read as 'ln dir/file .'. */