diff options
Diffstat (limited to 'selinux/chcon.c')
-rw-r--r-- | selinux/chcon.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/selinux/chcon.c b/selinux/chcon.c index a8a816be0..689ec8c8c 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c | |||
@@ -105,20 +105,19 @@ skip: | |||
105 | } | 105 | } |
106 | 106 | ||
107 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS | 107 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS |
108 | static struct option chcon_options[] = { | 108 | static const char chcon_longopts[] = |
109 | { "recursive", 0, NULL, 'R' }, | 109 | "recursive\0" No_argument "R" |
110 | { "changes", 0, NULL, 'c' }, | 110 | "changes\0" No_argument "c" |
111 | { "no-dereference", 0, NULL, 'h' }, | 111 | "no-dereference\0" No_argument "h" |
112 | { "silent", 0, NULL, 'f' }, | 112 | "silent\0" No_argument "f" |
113 | { "quiet", 0, NULL, 'f' }, | 113 | "quiet\0" No_argument "f" |
114 | { "user", 1, NULL, 'u' }, | 114 | "user\0" Required_argument "u" |
115 | { "role", 1, NULL, 'r' }, | 115 | "role\0" Required_argument "r" |
116 | { "type", 1, NULL, 't' }, | 116 | "type\0" Required_argument "t" |
117 | { "range", 1, NULL, 'l' }, | 117 | "range\0" Required_argument "l" |
118 | { "verbose", 0, NULL, 'v' }, | 118 | "verbose\0" No_argument "v" |
119 | { "reference", 1, NULL, 0xff }, /* no short option */ | 119 | "reference\0" Required_argument "\xff" /* no short option */ |
120 | { NULL, 0, NULL, 0 }, | 120 | "\0"; |
121 | }; | ||
122 | #endif | 121 | #endif |
123 | 122 | ||
124 | int chcon_main(int argc, char **argv); | 123 | int chcon_main(int argc, char **argv); |
@@ -129,7 +128,7 @@ int chcon_main(int argc, char **argv) | |||
129 | int i, errors = 0; | 128 | int i, errors = 0; |
130 | 129 | ||
131 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS | 130 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS |
132 | applet_long_options = chcon_options; | 131 | applet_long_options = chcon_longopts; |
133 | #endif | 132 | #endif |
134 | opt_complementary = "-1" /* at least 1 param */ | 133 | opt_complementary = "-1" /* at least 1 param */ |
135 | ":?" /* error if exclusivity constraints are violated */ | 134 | ":?" /* error if exclusivity constraints are violated */ |