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
1 changed files with 6 additions and 2 deletions

8
rm.c
View File

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