aboutsummaryrefslogtreecommitdiff
path: root/coreutils/mkdir.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-26 20:19:22 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-26 20:19:22 +0000
commit01d23ade577b94a1ab1fde54f69a3ce5f7399f3c (patch)
tree4071ca983cbd5a3912501bd1467dc063b3592aa9 /coreutils/mkdir.c
parentd29337580e6ad49ca3353a22b9099e9e47a4bd17 (diff)
downloadbusybox-w32-01d23ade577b94a1ab1fde54f69a3ce5f7399f3c.tar.gz
busybox-w32-01d23ade577b94a1ab1fde54f69a3ce5f7399f3c.tar.bz2
busybox-w32-01d23ade577b94a1ab1fde54f69a3ce5f7399f3c.zip
- add central knob to turn off getopt_long everywhere. EXPERIMENTAL!
Adds "Enable getopt long" under "General options", default y. Send patches to fix getopt_ulflags and run_parts.c if you turn this off.. See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
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;