diff options
Diffstat (limited to 'archival/cpio.c')
-rw-r--r-- | archival/cpio.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/archival/cpio.c b/archival/cpio.c index 6ab268821..9fa8badc5 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -308,16 +308,12 @@ int cpio_main(int argc UNUSED_PARAM, char **argv) | |||
308 | /* -L makes sense only with -o or -p */ | 308 | /* -L makes sense only with -o or -p */ |
309 | 309 | ||
310 | #if !ENABLE_FEATURE_CPIO_O | 310 | #if !ENABLE_FEATURE_CPIO_O |
311 | /* no parameters */ | ||
312 | opt_complementary = "=0"; | ||
313 | opt = getopt32(argv, OPTION_STR, &cpio_filename); | 311 | opt = getopt32(argv, OPTION_STR, &cpio_filename); |
314 | argv += optind; | 312 | argv += optind; |
315 | if (opt & CPIO_OPT_FILE) { /* -F */ | 313 | if (opt & CPIO_OPT_FILE) { /* -F */ |
316 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); | 314 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); |
317 | } | 315 | } |
318 | #else | 316 | #else |
319 | /* _exactly_ one parameter for -p, thus <= 1 param if -p is allowed */ | ||
320 | opt_complementary = ENABLE_FEATURE_CPIO_P ? "?1" : "=0"; | ||
321 | opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); | 317 | opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); |
322 | argv += optind; | 318 | argv += optind; |
323 | if ((opt & (CPIO_OPT_FILE|CPIO_OPT_CREATE)) == CPIO_OPT_FILE) { /* -F without -o */ | 319 | if ((opt & (CPIO_OPT_FILE|CPIO_OPT_CREATE)) == CPIO_OPT_FILE) { /* -F without -o */ |