commit 8eea7f74e9d35714e3d0a13d527e258758d1a5f3
parent 75382abbf392388d335ab8b8884189436f428d16
Author: sin <sin@2f30.org>
Date: Fri, 4 Jul 2014 14:50:20 +0100
A plain rm -f is valid and should not be considered an error
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/rm.c b/rm.c
@@ -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]);