aboutsummaryrefslogtreecommitdiff
path: root/coreutils/mkdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/mkdir.c')
-rw-r--r--coreutils/mkdir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 48a95badb..47f4cc843 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -34,11 +34,13 @@
34#include <getopt.h> /* struct option */ 34#include <getopt.h> /* struct option */
35#include "busybox.h" 35#include "busybox.h"
36 36
37#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
37static const struct option mkdir_long_options[] = { 38static const struct option mkdir_long_options[] = {
38 { "mode", 1, NULL, 'm' }, 39 { "mode", 1, NULL, 'm' },
39 { "parents", 0, NULL, 'p' }, 40 { "parents", 0, NULL, 'p' },
40 { 0, 0, 0, 0 } 41 { 0, 0, 0, 0 }
41}; 42};
43#endif
42 44
43int mkdir_main (int argc, char **argv) 45int mkdir_main (int argc, char **argv)
44{ 46{
@@ -48,7 +50,9 @@ int mkdir_main (int argc, char **argv)
48 unsigned long opt; 50 unsigned long opt;
49 char *smode; 51 char *smode;
50 52
53#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
51 bb_applet_long_options = mkdir_long_options; 54 bb_applet_long_options = mkdir_long_options;
55#endif
52 opt = bb_getopt_ulflags(argc, argv, "m:p", &smode); 56 opt = bb_getopt_ulflags(argc, argv, "m:p", &smode);
53 if(opt & 1) { 57 if(opt & 1) {
54 mode = 0777; 58 mode = 0777;