+ if (volume_label_option)
+ {
+ size_t volume_label_max_len =
+ (sizeof current_header->header.name
+ - 1 /* for trailing '\0' */
+ - (multi_volume_option
+ ? (sizeof " Volume "
+ - 1 /* for null at end of " Volume " */
+ + INT_STRLEN_BOUND (int) /* for volume number */
+ - 1 /* for sign, as 0 <= volno */)
+ : 0));
+ if (volume_label_max_len < strlen (volume_label_option))
+ USAGE_ERROR ((0, 0,
+ ngettext ("%s: Volume label is too long (limit is %lu byte)",
+ "%s: Volume label is too long (limit is %lu bytes)",
+ volume_label_max_len),
+ quotearg_colon (volume_label_option),
+ (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")));
+ }
+
+ /* It is no harm to use --pax-option on non-pax archives in archive
+ reading mode. It may even be useful, since it allows to override
+ file attributes from tar headers. Therefore I allow such usage.
+ --gray */
+ if (pax_option
+ && archive_format != POSIX_FORMAT
+ && (subcommand_option != EXTRACT_SUBCOMMAND
+ || subcommand_option != DIFF_SUBCOMMAND
+ || subcommand_option != LIST_SUBCOMMAND))
+ USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives")));
+