X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=4b86e7556a90963dcc8d1a3a92c6bad728b8854a;hb=8aa729b90e579cce02d1ef77256c3c4f7b8af29c;hp=f3228e146c79ebcb9037a86e48599bfe5a8f3131;hpb=ec4741d732fa5a37b245f3b27e4dadea9f2fe3b7;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index f3228e1..4b86e75 100644 --- a/src/tar.c +++ b/src/tar.c @@ -249,6 +249,7 @@ enum ANCHORED_OPTION = CHAR_MAX + 1, ATIME_PRESERVE_OPTION, BACKUP_OPTION, + CHECK_DEVICE_OPTION, CHECKPOINT_OPTION, CHECKPOINT_ACTION_OPTION, DELAY_DIRECTORY_RESTORE_OPTION, @@ -275,6 +276,7 @@ enum MTIME_OPTION, NEWER_MTIME_OPTION, NO_ANCHORED_OPTION, + NO_CHECK_DEVICE_OPTION, NO_DELAY_DIRECTORY_RESTORE_OPTION, NO_IGNORE_CASE_OPTION, NO_IGNORE_COMMAND_ERROR_OPTION, @@ -411,6 +413,12 @@ static struct argp_option options[] = { " NUMBER defaults to 1"), GRID+1 }, {"seek", 'n', NULL, 0, N_("archive is seekable"), GRID+1 }, + {"no-check-device", NO_CHECK_DEVICE_OPTION, NULL, 0, + N_("do not check device numbers when creating incremental archives"), + GRID+1 }, + {"check-device", CHECK_DEVICE_OPTION, NULL, 0, + N_("check device numbers when creating incremental archives (default)"), + GRID+1 }, #undef GRID #define GRID 30 @@ -1545,6 +1553,14 @@ parse_opt (int key, char *arg, struct argp_state *state) " on this platform"))); break; + case CHECK_DEVICE_OPTION: + check_device_option = true; + break; + + case NO_CHECK_DEVICE_OPTION: + check_device_option = false; + break; + case CHECKPOINT_OPTION: if (arg) { @@ -2053,6 +2069,8 @@ decode_options (int argc, char **argv) owner_option = -1; group_option = -1; + check_device_option = true; + /* Convert old-style tar call by exploding option element and rearranging options accordingly. */ @@ -2462,7 +2480,7 @@ main (int argc, char **argv) name_term (); if (exit_status == TAREXIT_FAILURE) - error (0, 0, _("Error exit delayed from previous errors")); + error (0, 0, _("Exiting with failure status due to previous errors")); if (stdlis == stdout) close_stdout ();