Fix some formatting
[oweals/busybox.git] / rm.c
diff --git a/rm.c b/rm.c
index 5663351588ea5df39886ba1f25e3c8c01c8a0a5b..302599ec07dff3c7f47aa7884c36fb155ca6d0ba 100644 (file)
--- a/rm.c
+++ b/rm.c
@@ -28,6 +28,8 @@
 #include <utime.h>
 #include <dirent.h>
 #include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
 
 static int recursiveFlag = FALSE;
 static int forceFlag = FALSE;
@@ -37,7 +39,7 @@ static const char *srcName;
 static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
 {
        if (unlink(fileName) < 0) {
-               perrorMsg("%s", fileName);
+               perror_msg("%s", fileName);
                return (FALSE);
        }
        return (TRUE);
@@ -47,11 +49,11 @@ static int dirAction(const char *fileName, struct stat *statbuf, void* junk)
 {
        if (recursiveFlag == FALSE) {
                errno = EISDIR;
-               perrorMsg("%s", fileName);
+               perror_msg("%s", fileName);
                return (FALSE);
        } 
        if (rmdir(fileName) < 0) {
-               perrorMsg("%s", fileName);
+               perror_msg("%s", fileName);
                return (FALSE);
        }
        return (TRUE);
@@ -101,7 +103,7 @@ extern int rm_main(int argc, char **argv)
                        && errno == ENOENT) {
                        /* do not reports errors for non-existent files if -f, just skip them */
                } else {
-                       if (recursiveAction(srcName, recursiveFlag, FALSE,
+                       if (recursive_action(srcName, recursiveFlag, FALSE,
                                                                TRUE, fileAction, dirAction, NULL) == FALSE) {
                                status = EXIT_FAILURE;
                        }