diff options
| author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-23 21:57:16 +0000 |
|---|---|---|
| committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-01-23 21:57:16 +0000 |
| commit | ca43b485deafb6467dbaf4dd3e6496da0239444c (patch) | |
| tree | 832fc45a8f07d85c372b619a8e3429060e7f4cee | |
| parent | 2d016a3715dee77d9832a16d1152f24c239c3e13 (diff) | |
| download | busybox-w32-ca43b485deafb6467dbaf4dd3e6496da0239444c.tar.gz busybox-w32-ca43b485deafb6467dbaf4dd3e6496da0239444c.tar.bz2 busybox-w32-ca43b485deafb6467dbaf4dd3e6496da0239444c.zip | |
Enable long options, adds 150 bytes.
| -rw-r--r-- | coreutils/install.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/coreutils/install.c b/coreutils/install.c index 84e60f934..82773b8de 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
| @@ -39,6 +39,16 @@ | |||
| 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 | static const struct option install_long_options[] = { | ||
| 43 | { "directory", 0, NULL, 'd' }, | ||
| 44 | { "preserve-timestamps", 0, NULL, 'p' }, | ||
| 45 | { "strip", 0, NULL, 's' }, | ||
| 46 | { "group", 0, NULL, 'g' }, | ||
| 47 | { "mode", 0, NULL, 'm' }, | ||
| 48 | { "owner", 0, NULL, 'o' }, | ||
| 49 | { 0, 0, 0, 0 } | ||
| 50 | }; | ||
| 51 | |||
| 42 | extern int install_main(int argc, char **argv) | 52 | extern int install_main(int argc, char **argv) |
| 43 | { | 53 | { |
| 44 | struct stat statbuf; | 54 | struct stat statbuf; |
| @@ -53,8 +63,9 @@ extern int install_main(int argc, char **argv) | |||
| 53 | int flags; | 63 | int flags; |
| 54 | int i; | 64 | int i; |
| 55 | 65 | ||
| 56 | /* -c exists for backwards compatability, its needed */ | 66 | bb_applet_long_options = install_long_options; |
| 57 | bb_opt_complementaly = "s~d:d~s"; | 67 | bb_opt_complementaly = "s~d:d~s"; |
| 68 | /* -c exists for backwards compatability, its needed */ | ||
| 58 | flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */ | 69 | flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */ |
| 59 | 70 | ||
| 60 | /* Check valid options were given */ | 71 | /* Check valid options were given */ |
