X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=6dc2ec560837508be616aee493103f272cfe9119;hb=570a2c5f3d2e610524702ffaa2ec803678c3aeeb;hp=c3c2459d99ad61caff46bb4fe92871f2f7c4238e;hpb=26538c9bfc5fd726d625bef5fa3f08212d50173a;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index c3c2459..6dc2ec5 100644 --- a/src/tar.c +++ b/src/tar.c @@ -337,6 +337,7 @@ enum SELINUX_CONTEXT_OPTION, SHOW_DEFAULTS_OPTION, SHOW_OMITTED_DIRS_OPTION, + SHOW_SNAPSHOT_FIELD_RANGES_OPTION, SHOW_TRANSFORMED_NAMES_OPTION, SKIP_OLD_FILES_OPTION, SPARSE_VERSION_OPTION, @@ -805,6 +806,8 @@ static struct argp_option options[] = { {"confirmation", 0, 0, OPTION_ALIAS, NULL, GRID+1 }, {"show-defaults", SHOW_DEFAULTS_OPTION, 0, 0, N_("show tar defaults"), GRID+1 }, + {"show-snapshot-field-ranges", SHOW_SNAPSHOT_FIELD_RANGES_OPTION, 0, 0, + N_("show valid ranges for snapshot-file fields"), GRID+1 }, {"show-omitted-dirs", SHOW_OMITTED_DIRS_OPTION, 0, 0, N_("when listing or extracting, list each directory that does not match search criteria"), GRID+1 }, {"show-transformed-names", SHOW_TRANSFORMED_NAMES_OPTION, 0, 0, @@ -967,7 +970,7 @@ set_subcommand_option (enum subcommand subcommand) if (subcommand_option != UNKNOWN_SUBCOMMAND && subcommand_option != subcommand) USAGE_ERROR ((0, 0, - _("You may not specify more than one '-Acdtrux' or '--test-label' option"))); + _("You may not specify more than one '-Acdtrux', '--delete' or '--test-label' option"))); subcommand_option = subcommand; } @@ -1949,6 +1952,11 @@ parse_opt (int key, char *arg, struct argp_state *state) exit (0); } + case SHOW_SNAPSHOT_FIELD_RANGES_OPTION: + show_snapshot_field_ranges (); + close_stdout (); + exit (0); + case STRIP_COMPONENTS_OPTION: { uintmax_t u; @@ -2633,7 +2641,7 @@ main (int argc, char **argv) { case UNKNOWN_SUBCOMMAND: USAGE_ERROR ((0, 0, - _("You must specify one of the '-Acdtrux' or '--test-label' options"))); + _("You must specify one of the '-Acdtrux', '--delete' or '--test-label' options"))); case CAT_SUBCOMMAND: case UPDATE_SUBCOMMAND: