From 463e7278f48deb9a358c89c44e9f54f3be046202 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 3 Jan 2004 22:26:11 +0000 Subject: [PATCH] (decode_options): More option compatibility checks (moved from buffer.c) --- src/tar.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/tar.c b/src/tar.c index a2ee37b..9350c50 100644 --- a/src/tar.c +++ b/src/tar.c @@ -1317,7 +1317,7 @@ see the file named COPYING for details.")); if (archive_names > 1 && !multi_volume_option) USAGE_ERROR ((0, 0, - _("Multiple archive files requires `-M' option"))); + _("Multiple archive files require `-M' option"))); if (listed_incremental_option && newer_mtime_option != TYPE_MINIMUM (time_t)) @@ -1344,6 +1344,22 @@ see the file named COPYING for details.")); (unsigned long) volume_label_max_len)); } + if (verify_option) + { + if (multi_volume_option) + USAGE_ERROR ((0, 0, _("Cannot verify multi-volume archives"))); + if (use_compress_program_option) + USAGE_ERROR ((0, 0, _("Cannot verify compressed archives"))); + } + + if (use_compress_program_option) + { + if (multi_volume_option) + USAGE_ERROR ((0, 0, _("Cannot use multi-volume compressed archives"))); + if (subcommand_option == UPDATE_SUBCOMMAND) + USAGE_ERROR ((0, 0, _("Cannot update compressed archives"))); + } + /* If ready to unlink hierarchies, so we are for simpler files. */ if (recursive_unlink_option) old_files_option = UNLINK_FIRST_OLD_FILES; -- 2.44.0