diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-26 20:19:22 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-05-26 20:19:22 +0000 |
commit | a5ce6cc258ab2f9349c22b64490415dd7fb27680 (patch) | |
tree | 4071ca983cbd5a3912501bd1467dc063b3592aa9 /coreutils/install.c | |
parent | 88605d02aa90480cd5127470a526c59b6e83297b (diff) | |
download | busybox-w32-a5ce6cc258ab2f9349c22b64490415dd7fb27680.tar.gz busybox-w32-a5ce6cc258ab2f9349c22b64490415dd7fb27680.tar.bz2 busybox-w32-a5ce6cc258ab2f9349c22b64490415dd7fb27680.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
git-svn-id: svn://busybox.net/trunk/busybox@15195 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/install.c')
-rw-r--r-- | coreutils/install.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/install.c b/coreutils/install.c index 7739fb615..90b3ef31b 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #define INSTALL_OPT_MODE 32 | 39 | #define INSTALL_OPT_MODE 32 |
40 | #define INSTALL_OPT_OWNER 64 | 40 | #define INSTALL_OPT_OWNER 64 |
41 | 41 | ||
42 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS | ||
42 | static const struct option install_long_options[] = { | 43 | static const struct option install_long_options[] = { |
43 | { "directory", 0, NULL, 'd' }, | 44 | { "directory", 0, NULL, 'd' }, |
44 | { "preserve-timestamps", 0, NULL, 'p' }, | 45 | { "preserve-timestamps", 0, NULL, 'p' }, |
@@ -48,6 +49,7 @@ static const struct option install_long_options[] = { | |||
48 | { "owner", 0, NULL, 'o' }, | 49 | { "owner", 0, NULL, 'o' }, |
49 | { 0, 0, 0, 0 } | 50 | { 0, 0, 0, 0 } |
50 | }; | 51 | }; |
52 | #endif | ||
51 | 53 | ||
52 | int install_main(int argc, char **argv) | 54 | int install_main(int argc, char **argv) |
53 | { | 55 | { |
@@ -60,7 +62,9 @@ int install_main(int argc, char **argv) | |||
60 | int copy_flags = FILEUTILS_DEREFERENCE | FILEUTILS_FORCE; | 62 | int copy_flags = FILEUTILS_DEREFERENCE | FILEUTILS_FORCE; |
61 | int ret = EXIT_SUCCESS, flags, i, isdir; | 63 | int ret = EXIT_SUCCESS, flags, i, isdir; |
62 | 64 | ||
65 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS | ||
63 | bb_applet_long_options = install_long_options; | 66 | bb_applet_long_options = install_long_options; |
67 | #endif | ||
64 | bb_opt_complementally = "?:s--d:d--s"; | 68 | bb_opt_complementally = "?:s--d:d--s"; |
65 | /* -c exists for backwards compatibility, its needed */ | 69 | /* -c exists for backwards compatibility, its needed */ |
66 | flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */ | 70 | flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */ |