diff options
Diffstat (limited to 'coreutils/mkdir.c')
-rw-r--r-- | coreutils/mkdir.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 60c03a1f9..b0595b43f 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -25,14 +25,13 @@ | |||
25 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* This is a NOFORK applet. Be very careful! */ |
26 | 26 | ||
27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS | 27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS |
28 | static const struct option mkdir_long_options[] = { | 28 | static const char mkdir_longopts[] = |
29 | { "mode" , 1, NULL, 'm' }, | 29 | "mode\0" Required_argument "m" |
30 | { "parents", 0, NULL, 'p' }, | 30 | "parents\0" No_argument "p" |
31 | #if ENABLE_SELINUX | 31 | #if ENABLE_SELINUX |
32 | { "context", 1, NULL, 'Z' }, | 32 | "context\0" Required_argument "Z" |
33 | #endif | 33 | #endif |
34 | { NULL, 0, NULL, 0 } | 34 | "\0"; |
35 | }; | ||
36 | #endif | 35 | #endif |
37 | 36 | ||
38 | int mkdir_main(int argc, char **argv); | 37 | int mkdir_main(int argc, char **argv); |
@@ -48,7 +47,7 @@ int mkdir_main(int argc, char **argv) | |||
48 | #endif | 47 | #endif |
49 | 48 | ||
50 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS | 49 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS |
51 | applet_long_options = mkdir_long_options; | 50 | applet_long_options = mkdir_longopts; |
52 | #endif | 51 | #endif |
53 | opt = getopt32(argc, argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext)); | 52 | opt = getopt32(argc, argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext)); |
54 | if (opt & 1) { | 53 | if (opt & 1) { |