aboutsummaryrefslogtreecommitdiff
path: root/coreutils/install.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/install.c')
-rw-r--r--coreutils/install.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/coreutils/install.c b/coreutils/install.c
index a1342bb13..2e4dc257f 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -55,12 +55,17 @@ static const char install_longopts[] ALIGN1 =
55 "target-directory\0" Required_argument "t" 55 "target-directory\0" Required_argument "t"
56/* autofs build insists of using -b --suffix=.orig */ 56/* autofs build insists of using -b --suffix=.orig */
57/* TODO? (short option for --suffix is -S) */ 57/* TODO? (short option for --suffix is -S) */
58#if ENABLE_SELINUX 58# if ENABLE_SELINUX
59 "context\0" Required_argument "Z" 59 "context\0" Required_argument "Z"
60 "preserve_context\0" No_argument "\xff" 60 "preserve_context\0" No_argument "\xff"
61 "preserve-context\0" No_argument "\xff" 61 "preserve-context\0" No_argument "\xff"
62#endif 62# endif
63 ; 63 ;
64# define GETOPT32 getopt32long
65# define LONGOPTS install_longopts,
66#else
67# define GETOPT32 getopt32
68# define LONGOPTS
64#endif 69#endif
65 70
66 71
@@ -135,15 +140,17 @@ int install_main(int argc, char **argv)
135#endif 140#endif
136 }; 141 };
137 142
138#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
139 applet_long_options = install_longopts;
140#endif
141 opt_complementary = "t--d:d--t:s--d:d--s" IF_FEATURE_INSTALL_LONG_OPTIONS(IF_SELINUX(":Z--\xff:\xff--Z"));
142 /* -c exists for backwards compatibility, it's needed */ 143 /* -c exists for backwards compatibility, it's needed */
143 /* -b is ignored ("make a backup of each existing destination file") */ 144 /* -b is ignored ("make a backup of each existing destination file") */
144 opts = getopt32(argv, "cvb" "Ddpsg:m:o:t:" IF_SELINUX("Z:"), 145 opts = GETOPT32(argv, "^"
145 &gid_str, &mode_str, &uid_str, &last 146 "cvb" "Ddpsg:m:o:t:" IF_SELINUX("Z:")
146 IF_SELINUX(, &scontext)); 147 "\0"
148 "t--d:d--t:s--d:d--s"
149 IF_FEATURE_INSTALL_LONG_OPTIONS(IF_SELINUX(":Z--\xff:\xff--Z")),
150 LONGOPTS
151 &gid_str, &mode_str, &uid_str, &last
152 IF_SELINUX(, &scontext)
153 );
147 argc -= optind; 154 argc -= optind;
148 argv += optind; 155 argv += optind;
149 156