X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=8b35c58bf43bb6e7f69e37710b07d9785dbf8ef7;hb=711064182107ecdbc43965752fcaf88490711684;hp=f122f7abecfefe15c67a3a0eafb0f100405be05c;hpb=4bf5f6dca4481b8eb9ab67209f085b29787e954a;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index f122f7a..8b35c58 100644 --- a/src/tar.c +++ b/src/tar.c @@ -2038,13 +2038,6 @@ decode_options (int argc, char **argv) | FORMAT_MASK (GNU_FORMAT) | FORMAT_MASK (POSIX_FORMAT)); - if (multi_volume_option - && archive_format == POSIX_FORMAT - && subcommand_option == CREATE_SUBCOMMAND - && !tape_length_option) - USAGE_ERROR ((0, 0, - _("creating multi-volume archives in posix format requires using --tape-length (-L) option"))); - if (occurrence_option) { if (!args.input_files) @@ -2198,6 +2191,16 @@ decode_options (int argc, char **argv) break; } + /* Initialize stdlis */ + if (index_file_name) + { + stdlis = fopen (index_file_name, "w"); + if (! stdlis) + open_error (index_file_name); + } + else + stdlis = to_stdout_option ? stderr : stdout; + archive_name_cursor = archive_name_array; /* Prepare for generating backup names. */ @@ -2240,6 +2243,9 @@ main (int argc, char **argv) /* Make sure we have first three descriptors available */ stdopen (); + /* Close all inherited open descriptors, except for the first three */ + closeopen (); + /* Pre-allocate a few structures. */ allocated_archive_names = 10;