Stuff
[oweals/busybox.git] / coreutils / rm.c
index 477d3af598bfe09d012ec606b49e80101b234fbe..077e792f9615119708a3f9dbc726aa27a9258bb6 100644 (file)
@@ -1,7 +1,9 @@
 /*
  * Mini rm implementation for busybox
  *
- * Copyright (C) 1998 by Erik Andersen <andersee@debian.org>
+ *
+ * Copyright (C) 1999 by Lineo, inc.
+ * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -25,7 +27,7 @@
 #include <utime.h>
 #include <dirent.h>
 
-static const char* rm_usage = "Usage: rm [OPTION]... FILE...\n"
+static const char* rm_usage = "rm [OPTION]... FILE...\n"
 "Remove (unlink) the FILE(s).\n\n"
 "\t-f\tremove existing destinations, never prompt\n"
 "\t-r\tremove the contents of directories recursively\n";
@@ -58,8 +60,7 @@ extern int rm_main(int argc, char **argv)
 {
 
     if (argc < 2) {
-       fprintf(stderr, "Usage: %s", rm_usage);
-       exit (FALSE);
+       usage( rm_usage);
     }
     argc--;
     argv++;
@@ -75,8 +76,7 @@ extern int rm_main(int argc, char **argv)
                forceFlag = TRUE;
                break;
            default:
-               fprintf(stderr, "Usage: %s\n", rm_usage);
-               exit(FALSE);
+               usage( rm_usage);
            }
        argc--;
        argv++;
@@ -84,7 +84,7 @@ extern int rm_main(int argc, char **argv)
 
     while (argc-- > 0) {
        srcName = *(argv++);
-       if (recursiveAction( srcName, recursiveFlag, TRUE, TRUE, 
+       if (recursiveAction( srcName, recursiveFlag, FALSE, TRUE, 
                               fileAction, dirAction) == FALSE) {
            exit( FALSE);
        }