A plain rm -f is valid and should not be considered an error

This commit is contained in:
sin 2014-07-04 14:50:20 +01:00
parent 75382abbf3
commit 8eea7f74e9

8
rm.c
View File

@ -28,8 +28,12 @@ main(int argc, char *argv[])
usage(); usage();
} ARGEND; } ARGEND;
if (argc < 1) if (argc < 1) {
usage(); if (rm_fflag == false)
usage();
else
return EXIT_SUCCESS;
}
for(; argc > 0; argc--, argv++) for(; argc > 0; argc--, argv++)
rm(argv[0]); rm(argv[0]);