- don't free user-supplied string (via -e)
[oweals/busybox.git] / libbb / make_directory.c
index 01a864119e8f48014f72ebf4ebcb6820066e116c..5c71aff921421a6f9d55d598aa4b19b76d20ff5f 100644 (file)
  * val.  Otherwise, pass -1 to get default permissions.
  */
 
-#include <errno.h>
-#include <unistd.h>
-#include <sys/stat.h>
 #include "libbb.h"
 
-int bb_make_directory (char *path, long mode, int flags)
+/* This function is used from NOFORK applets. It must not allocate anything */
+
+int FAST_FUNC bb_make_directory(char *path, long mode, int flags)
 {
        mode_t mask;
        const char *fail_msg;
@@ -99,6 +98,6 @@ int bb_make_directory (char *path, long mode, int flags)
 
        } while (1);
 
-       bb_perror_msg ("Cannot %s directory `%s'", fail_msg, path);
+       bb_perror_msg("cannot %s directory '%s'", fail_msg, path);
        return -1;
 }