Lines 41-46
Link Here
|
41 |
|
41 |
|
42 |
enum cpio_options { |
42 |
enum cpio_options { |
43 |
NO_ABSOLUTE_FILENAMES_OPTION=256, |
43 |
NO_ABSOLUTE_FILENAMES_OPTION=256, |
|
|
44 |
ABSOLUTE_FILENAMES_OPTION, |
44 |
NO_PRESERVE_OWNER_OPTION, |
45 |
NO_PRESERVE_OWNER_OPTION, |
45 |
ONLY_VERIFY_CRC_OPTION, |
46 |
ONLY_VERIFY_CRC_OPTION, |
46 |
RENAME_BATCH_FILE_OPTION, |
47 |
RENAME_BATCH_FILE_OPTION, |
Lines 134-139
static struct argp_option options[] = {
Link Here
|
134 |
N_("In copy-in mode, read additional patterns specifying filenames to extract or list from FILE"), 210}, |
135 |
N_("In copy-in mode, read additional patterns specifying filenames to extract or list from FILE"), 210}, |
135 |
{"no-absolute-filenames", NO_ABSOLUTE_FILENAMES_OPTION, 0, 0, |
136 |
{"no-absolute-filenames", NO_ABSOLUTE_FILENAMES_OPTION, 0, 0, |
136 |
N_("Create all files relative to the current directory"), 210}, |
137 |
N_("Create all files relative to the current directory"), 210}, |
|
|
138 |
{"absolute-filenames", ABSOLUTE_FILENAMES_OPTION, 0, 0, |
139 |
N_("do not strip leading file name components that contain \"..\" and leading slashes from file names"), 210}, |
137 |
{"only-verify-crc", ONLY_VERIFY_CRC_OPTION, 0, 0, |
140 |
{"only-verify-crc", ONLY_VERIFY_CRC_OPTION, 0, 0, |
138 |
N_("When reading a CRC format archive in copy-in mode, only verify the CRC's of each file in the archive, don't actually extract the files"), 210}, |
141 |
N_("When reading a CRC format archive in copy-in mode, only verify the CRC's of each file in the archive, don't actually extract the files"), 210}, |
139 |
{"rename", 'r', 0, 0, |
142 |
{"rename", 'r', 0, 0, |
Lines 393-399
crc newc odc bin ustar tar (all-caps als
Link Here
|
393 |
break; |
396 |
break; |
394 |
|
397 |
|
395 |
case NO_ABSOLUTE_FILENAMES_OPTION: /* --no-absolute-filenames */ |
398 |
case NO_ABSOLUTE_FILENAMES_OPTION: /* --no-absolute-filenames */ |
396 |
no_abs_paths_flag = true; |
399 |
abs_paths_flag = false; |
|
|
400 |
break; |
401 |
|
402 |
case ABSOLUTE_FILENAMES_OPTION: /* --absolute-filenames */ |
403 |
abs_paths_flag = true; |
397 |
break; |
404 |
break; |
398 |
|
405 |
|
399 |
case NO_PRESERVE_OWNER_OPTION: /* --no-preserve-owner */ |
406 |
case NO_PRESERVE_OWNER_OPTION: /* --no-preserve-owner */ |
Lines 631-637
process_args (int argc, char *argv[])
Link Here
|
631 |
_("--append is used but no archive file name is given (use -F or -O options"))); |
638 |
_("--append is used but no archive file name is given (use -F or -O options"))); |
632 |
|
639 |
|
633 |
CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--create"); |
640 |
CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--create"); |
634 |
CHECK_USAGE(no_abs_paths_flag, "--no-absolute-pathnames", "--create"); |
641 |
CHECK_USAGE(abs_paths_flag, "--absolute-pathnames", "--create"); |
635 |
CHECK_USAGE(input_archive_name, "-I", "--create"); |
642 |
CHECK_USAGE(input_archive_name, "-I", "--create"); |
636 |
if (archive_name && output_archive_name) |
643 |
if (archive_name && output_archive_name) |
637 |
USAGE_ERROR ((0, 0, _("Both -O and -F are used in copy-out mode"))); |
644 |
USAGE_ERROR ((0, 0, _("Both -O and -F are used in copy-out mode"))); |
Lines 658-664
process_args (int argc, char *argv[])
Link Here
|
658 |
CHECK_USAGE(rename_flag, "--rename", "--pass-through"); |
665 |
CHECK_USAGE(rename_flag, "--rename", "--pass-through"); |
659 |
CHECK_USAGE(append_flag, "--append", "--pass-through"); |
666 |
CHECK_USAGE(append_flag, "--append", "--pass-through"); |
660 |
CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--pass-through"); |
667 |
CHECK_USAGE(rename_batch_file, "--rename-batch-file", "--pass-through"); |
661 |
CHECK_USAGE(no_abs_paths_flag, "--no-absolute-pathnames", |
668 |
CHECK_USAGE(abs_paths_flag, "--absolute-pathnames", |
662 |
"--pass-through"); |
669 |
"--pass-through"); |
663 |
CHECK_USAGE(to_stdout_option, "--to-stdout", "--pass-through"); |
670 |
CHECK_USAGE(to_stdout_option, "--to-stdout", "--pass-through"); |
664 |
|
671 |
|