/* Globbing pattern to append to volume label if initial match failed. */
#define VOLUME_LABEL_APPEND " Volume [1-9]*"
/* Variables. */
/* Globbing pattern to append to volume label if initial match failed. */
#define VOLUME_LABEL_APPEND " Volume [1-9]*"
/* Variables. */
-static tarlong prev_written; /* bytes written on previous volumes */
-static tarlong bytes_written; /* bytes written on this volume */
-static void *record_buffer[2]; /* allocated memory */
+static tarlong prev_written; /* bytes written on previous volumes */
+static tarlong bytes_written; /* bytes written on this volume */
+static void *record_buffer[2]; /* allocated memory */
union block *record_buffer_aligned[2];
static int record_index;
/* FIXME: The following variables should ideally be static to this
module. However, this cannot be done yet. The cleanup continues! */
union block *record_buffer_aligned[2];
static int record_index;
/* FIXME: The following variables should ideally be static to this
module. However, this cannot be done yet. The cleanup continues! */
-union block *record_start; /* start of record of archive */
-union block *record_end; /* last+1 block of archive record */
-union block *current_block; /* current block of archive */
-enum access_mode access_mode; /* how do we handle the archive */
-off_t records_read; /* number of records read from this archive */
-off_t records_written; /* likewise, for records written */
+union block *record_start; /* start of record of archive */
+union block *record_end; /* last+1 block of archive record */
+union block *current_block; /* current block of archive */
+enum access_mode access_mode; /* how do we handle the archive */
+off_t records_read; /* number of records read from this archive */
+off_t records_written; /* likewise, for records written */
-static int volno = 1; /* which volume of a multi-volume tape we're
- on */
-static int global_volno = 1; /* volume number to print in external
- messages */
+static int volno = 1; /* which volume of a multi-volume tape we're
+ on */
+static int global_volno = 1; /* volume number to print in external
+ messages */
-static char *save_name; /* name of the file we are currently writing */
-static off_t save_totsize; /* total size of file we are writing, only
- valid if save_name is nonzero */
-static off_t save_sizeleft; /* where we are in the file we are writing,
- only valid if save_name is nonzero */
+static char *save_name; /* name of the file we are currently writing */
+static off_t save_totsize; /* total size of file we are writing, only
+ valid if save_name is nonzero */
+static off_t save_sizeleft; /* where we are in the file we are writing,
+ only valid if save_name is nonzero */
record_end = record_start; /* set up for 1st record = # 0 */
sfr = read_full_records;
read_full_records = true; /* Suppress fatal error on reading a partial
record_end = record_start; /* set up for 1st record = # 0 */
sfr = read_full_records;
read_full_records = true; /* Suppress fatal error on reading a partial
open_compressed_archive ()
{
archive = rmtopen (archive_name_array[0], O_RDONLY | O_BINARY,
open_compressed_archive ()
{
archive = rmtopen (archive_name_array[0], O_RDONLY | O_BINARY,
- {
- bool shortfile;
- enum compress_type type = check_compressed_archive (&shortfile);
-
- switch (type)
- {
- case ct_tar:
- if (shortfile)
- ERROR ((0, 0, _("This does not look like a tar archive")));
- return archive;
+ {
+ bool shortfile;
+ enum compress_type type = check_compressed_archive (&shortfile);
+
+ switch (type)
+ {
+ case ct_tar:
+ if (shortfile)
+ ERROR ((0, 0, _("This does not look like a tar archive")));
+ return archive;
- case ct_none:
- if (shortfile)
- ERROR ((0, 0, _("This does not look like a tar archive")));
- set_comression_program_by_suffix (archive_name_array[0], NULL);
- if (!use_compress_program_option)
- return archive;
- break;
-
- default:
- use_compress_program_option = compress_program (type);
- break;
- }
- }
+ case ct_none:
+ if (shortfile)
+ ERROR ((0, 0, _("This does not look like a tar archive")));
+ set_comression_program_by_suffix (archive_name_array[0], NULL);
+ if (!use_compress_program_option)
+ return archive;
+ break;
+
+ default:
+ use_compress_program_option = compress_program (type);
+ break;
+ }
+ }
sprintf (bytes, TARLONG_FORMAT, numbytes);
fprintf (fp, "%s: %s (%s, %s/s)\n",
sprintf (bytes, TARLONG_FORMAT, numbytes);
fprintf (fp, "%s: %s (%s, %s/s)\n",
- text, bytes,
- human_readable (numbytes, abbr, human_opts, 1, 1),
- (0 < duration && numbytes / duration < (uintmax_t) -1
- ? human_readable (numbytes / duration, rate, human_opts, 1, 1)
- : "?"));
+ text, bytes,
+ human_readable (numbytes, abbr, human_opts, 1, 1),
+ (0 < duration && numbytes / duration < (uintmax_t) -1
+ ? human_readable (numbytes / duration, rate, human_opts, 1, 1)
+ : "?"));
case APPEND_SUBCOMMAND:
/* Amanda 2.4.1p1 looks for "Total bytes written: [0-9][0-9]*". */
print_stats (stderr, _("Total bytes written"),
case APPEND_SUBCOMMAND:
/* Amanda 2.4.1p1 looks for "Total bytes written: [0-9][0-9]*". */
print_stats (stderr, _("Total bytes written"),
- char buf[UINTMAX_STRSIZE_BOUND];
- print_stats (stderr, _("Total bytes read"),
- records_read * record_size);
- print_stats (stderr, _("Total bytes written"),
- prev_written + bytes_written);
- fprintf (stderr, _("Total bytes deleted: %s\n"),
- STRINGIFY_BIGINT ((records_read - records_skipped)
- * record_size
- - (prev_written + bytes_written), buf));
+ char buf[UINTMAX_STRSIZE_BOUND];
+ print_stats (stderr, _("Total bytes read"),
+ records_read * record_size);
+ print_stats (stderr, _("Total bytes written"),
+ prev_written + bytes_written);
+ fprintf (stderr, _("Total bytes deleted: %s\n"),
+ STRINGIFY_BIGINT ((records_read - records_skipped)
+ * record_size
+ - (prev_written + bytes_written), buf));
- {
- case ACCESS_READ:
- child_pid = sys_child_open_for_uncompress ();
- read_full_records = true;
- record_end = record_start; /* set up for 1st record = # 0 */
- break;
-
- case ACCESS_WRITE:
- child_pid = sys_child_open_for_compress ();
- break;
-
- case ACCESS_UPDATE:
- abort (); /* Should not happen */
- break;
- }
+ {
+ case ACCESS_READ:
+ child_pid = sys_child_open_for_uncompress ();
+ read_full_records = true;
+ record_end = record_start; /* set up for 1st record = # 0 */
+ break;
+
+ case ACCESS_WRITE:
+ child_pid = sys_child_open_for_compress ();
+ break;
+
+ case ACCESS_UPDATE:
+ abort (); /* Should not happen */
+ break;
+ }
- && wanted_access == ACCESS_WRITE
- && strcmp (archive_name_array[0], "-") == 0)
- stdlis = stderr;
+ && wanted_access == ACCESS_WRITE
+ && strcmp (archive_name_array[0], "-") == 0)
+ stdlis = stderr;
}
else if (strcmp (archive_name_array[0], "-") == 0)
{
read_full_records = true; /* could be a pipe, be safe */
if (verify_option)
}
else if (strcmp (archive_name_array[0], "-") == 0)
{
read_full_records = true; /* could be a pipe, be safe */
if (verify_option)
- {
- case ACCESS_READ:
- {
- bool shortfile;
- enum compress_type type;
-
- archive = STDIN_FILENO;
-
- type = check_compressed_archive (&shortfile);
- if (type != ct_tar && type != ct_none)
- FATAL_ERROR ((0, 0,
- _("Archive is compressed. Use %s option"),
- compress_option (type)));
- if (shortfile)
- ERROR ((0, 0, _("This does not look like a tar archive")));
- }
- break;
-
- case ACCESS_WRITE:
- archive = STDOUT_FILENO;
- if (!index_file_name)
- stdlis = stderr;
- break;
-
- case ACCESS_UPDATE:
- archive = STDIN_FILENO;
- write_archive_to_stdout = true;
- record_end = record_start; /* set up for 1st record = # 0 */
- if (!index_file_name)
- stdlis = stderr;
- break;
- }
+ {
+ case ACCESS_READ:
+ {
+ bool shortfile;
+ enum compress_type type;
+
+ archive = STDIN_FILENO;
+
+ type = check_compressed_archive (&shortfile);
+ if (type != ct_tar && type != ct_none)
+ FATAL_ERROR ((0, 0,
+ _("Archive is compressed. Use %s option"),
+ compress_option (type)));
+ if (shortfile)
+ ERROR ((0, 0, _("This does not look like a tar archive")));
+ }
+ break;
+
+ case ACCESS_WRITE:
+ archive = STDOUT_FILENO;
+ if (!index_file_name)
+ stdlis = stderr;
+ break;
+
+ case ACCESS_UPDATE:
+ archive = STDIN_FILENO;
+ write_archive_to_stdout = true;
+ record_end = record_start; /* set up for 1st record = # 0 */
+ if (!index_file_name)
+ stdlis = stderr;
+ break;
+ }
- if (backup_option)
- {
- maybe_backup_file (archive_name_array[0], 1);
- backed_up_flag = 1;
- }
- archive = rmtcreat (archive_name_array[0], MODE_RW,
- rsh_command_option);
- break;
+ if (backup_option)
+ {
+ maybe_backup_file (archive_name_array[0], 1);
+ backed_up_flag = 1;
+ }
+ archive = rmtcreat (archive_name_array[0], MODE_RW,
+ rsh_command_option);
+ break;
- archive = rmtopen (archive_name_array[0],
- O_RDWR | O_CREAT | O_BINARY,
- MODE_RW, rsh_command_option);
-
- switch (check_compressed_archive (NULL))
- {
- case ct_none:
- case ct_tar:
- break;
-
- default:
- FATAL_ERROR ((0, 0,
- _("Cannot update compressed archives")));
- }
- break;
+ archive = rmtopen (archive_name_array[0],
+ O_RDWR | O_CREAT | O_BINARY,
+ MODE_RW, rsh_command_option);
+
+ switch (check_compressed_archive (NULL))
+ {
+ case ct_none:
+ case ct_tar:
+ break;
+
+ default:
+ FATAL_ERROR ((0, 0,
+ _("Cannot update compressed archives")));
+ }
+ break;
more = record_start->buffer + status;
left = record_size - status;
while (left % BLOCKSIZE != 0
more = record_start->buffer + status;
left = record_size - status;
while (left % BLOCKSIZE != 0
- FATAL_ERROR ((0, 0,
- ngettext ("Unaligned block (%lu byte) in archive",
- "Unaligned block (%lu bytes) in archive",
- rest),
- rest));
- }
+ FATAL_ERROR ((0, 0,
+ ngettext ("Unaligned block (%lu byte) in archive",
+ "Unaligned block (%lu bytes) in archive",
+ rest),
+ rest));
+ }
- ngettext ("Record size = %lu block",
- "Record size = %lu blocks",
- rsize),
- rsize));
+ ngettext ("Record size = %lu block",
+ "Record size = %lu blocks",
+ rsize),
+ rsize));
- if (record_start->buffer != output_start)
- memset (record_start->buffer, 0,
- output_start - record_start->buffer);
+ if (record_start->buffer != output_start)
+ memset (record_start->buffer, 0,
+ output_start - record_start->buffer);
- || global_volno < 0)
- FATAL_ERROR ((0, 0, _("%s: contains invalid volume number"),
- quotearg_colon (volno_file_option)));
+ || global_volno < 0)
+ FATAL_ERROR ((0, 0, _("%s: contains invalid volume number"),
+ quotearg_colon (volno_file_option)));
- _("Prepare volume #%d for %s and hit return: "),
- global_volno + 1, quote (*archive_name_cursor));
+ _("Prepare volume #%d for %s and hit return: "),
+ global_volno + 1, quote (*archive_name_cursor));
- if (subcommand_option != EXTRACT_SUBCOMMAND
- && subcommand_option != LIST_SUBCOMMAND
- && subcommand_option != DIFF_SUBCOMMAND)
- WARN ((0, 0, _("WARNING: Archive is incomplete")));
+ if (subcommand_option != EXTRACT_SUBCOMMAND
+ && subcommand_option != LIST_SUBCOMMAND
+ && subcommand_option != DIFF_SUBCOMMAND)
+ WARN ((0, 0, _("WARNING: Archive is incomplete")));
n name Give a new file name for the next (and subsequent) volume(s)\n\
q Abort tar\n\
y or newline Continue operation\n"));
if (!restrict_option)
fprintf (stderr, _(" ! Spawn a subshell\n"));
n name Give a new file name for the next (and subsequent) volume(s)\n\
q Abort tar\n\
y or newline Continue operation\n"));
if (!restrict_option)
fprintf (stderr, _(" ! Spawn a subshell\n"));
- fprintf (stderr, _(" ? Print this list\n"));
- }
- break;
-
- case 'q':
- /* Quit. */
-
- WARN ((0, 0, _("No new volume; exiting.\n")));
-
- if (subcommand_option != EXTRACT_SUBCOMMAND
- && subcommand_option != LIST_SUBCOMMAND
- && subcommand_option != DIFF_SUBCOMMAND)
- WARN ((0, 0, _("WARNING: Archive is incomplete")));
-
- fatal_exit ();
-
- case 'n':
- /* Get new file name. */
-
- {
- char *name;
- char *cursor;
-
- for (name = input_buffer + 1;
- *name == ' ' || *name == '\t';
- name++)
- ;
-
- for (cursor = name; *cursor && *cursor != '\n'; cursor++)
- ;
- *cursor = '\0';
-
- if (name[0])
- {
- /* FIXME: the following allocation is never reclaimed. */
- *archive_name_cursor = xstrdup (name);
- stop = true;
- }
- else
- fprintf (stderr, "%s",
- _("File name not specified. Try again.\n"));
- }
- break;
-
- case '!':
- if (!restrict_option)
- {
- sys_spawn_shell ();
- break;
- }
- /* FALL THROUGH */
-
- default:
- fprintf (stderr, _("Invalid input. Type ? for help.\n"));
- }
+ fprintf (stderr, _(" ? Print this list\n"));
+ }
+ break;
+
+ case 'q':
+ /* Quit. */
+
+ WARN ((0, 0, _("No new volume; exiting.\n")));
+
+ if (subcommand_option != EXTRACT_SUBCOMMAND
+ && subcommand_option != LIST_SUBCOMMAND
+ && subcommand_option != DIFF_SUBCOMMAND)
+ WARN ((0, 0, _("WARNING: Archive is incomplete")));
+
+ fatal_exit ();
+
+ case 'n':
+ /* Get new file name. */
+
+ {
+ char *name;
+ char *cursor;
+
+ for (name = input_buffer + 1;
+ *name == ' ' || *name == '\t';
+ name++)
+ ;
+
+ for (cursor = name; *cursor && *cursor != '\n'; cursor++)
+ ;
+ *cursor = '\0';
+
+ if (name[0])
+ {
+ /* FIXME: the following allocation is never reclaimed. */
+ *archive_name_cursor = xstrdup (name);
+ stop = true;
+ }
+ else
+ fprintf (stderr, "%s",
+ _("File name not specified. Try again.\n"));
+ }
+ break;
+
+ case '!':
+ if (!restrict_option)
+ {
+ sys_spawn_shell ();
+ break;
+ }
+ /* FALL THROUGH */
+
+ default:
+ fprintf (stderr, _("Invalid input. Type ? for help.\n"));
+ }
- {
- if (volno_file_option)
- closeout_volume_number ();
- if (sys_exec_info_script (archive_name_cursor, global_volno+1))
- FATAL_ERROR ((0, 0, _("%s command failed"),
- quote (info_script_option)));
- }
+ {
+ if (volno_file_option)
+ closeout_volume_number ();
+ if (sys_exec_info_script (archive_name_cursor, global_volno+1))
+ FATAL_ERROR ((0, 0, _("%s command failed"),
+ quote (info_script_option)));
+ }
}
else if (verify_option)
archive = rmtopen (*archive_name_cursor, O_RDWR | O_CREAT, MODE_RW,
}
else if (verify_option)
archive = rmtopen (*archive_name_cursor, O_RDWR | O_CREAT, MODE_RW,
- archive = rmtopen (*archive_name_cursor, O_RDONLY, MODE_RW,
- rsh_command_option);
- break;
+ archive = rmtopen (*archive_name_cursor, O_RDONLY, MODE_RW,
+ rsh_command_option);
+ break;
- if (backup_option)
- maybe_backup_file (*archive_name_cursor, 1);
- archive = rmtcreat (*archive_name_cursor, MODE_RW,
- rsh_command_option);
- break;
+ if (backup_option)
+ maybe_backup_file (*archive_name_cursor, 1);
+ archive = rmtcreat (*archive_name_cursor, MODE_RW,
+ rsh_command_option);
+ break;
- archive = rmtopen (*archive_name_cursor, O_RDWR | O_CREAT, MODE_RW,
- rsh_command_option);
- break;
+ archive = rmtopen (*archive_name_cursor, O_RDWR | O_CREAT, MODE_RW,
+ rsh_command_option);
+ break;
- if (!read_header0 (&dummy))
- return false;
- xheader_decode (&dummy); /* decodes values from the global header */
- tar_stat_destroy (&dummy);
- if (!real_s_name)
- {
- /* We have read the extended header of the first member in
- this volume. Put it back, so next read_header works as
- expected. */
- current_block = record_start;
- }
- break;
+ if (!read_header0 (&dummy))
+ return false;
+ xheader_decode (&dummy); /* decodes values from the global header */
+ tar_stat_destroy (&dummy);
+ if (!real_s_name)
+ {
+ /* We have read the extended header of the first member in
+ this volume. Put it back, so next read_header works as
+ expected. */
+ current_block = record_start;
+ }
+ break;
tar_stat_destroy (&dummy);
assign_string (&volume_label, current_header->header.name);
set_next_block_after (header);
header = find_next_block ();
if (header->header.typeflag != GNUTYPE_MULTIVOL)
tar_stat_destroy (&dummy);
assign_string (&volume_label, current_header->header.name);
set_next_block_after (header);
header = find_next_block ();
if (header->header.typeflag != GNUTYPE_MULTIVOL)
tar_stat_destroy (&dummy);
assign_string (&continued_file_name, current_header->header.name);
continued_file_size =
tar_stat_destroy (&dummy);
assign_string (&continued_file_name, current_header->header.name);
continued_file_size =
- || strcmp (continued_file_name, real_s_name))
- {
- if ((archive_format == GNU_FORMAT || archive_format == OLDGNU_FORMAT)
- && strlen (real_s_name) >= NAME_FIELD_SIZE
- && strncmp (continued_file_name, real_s_name,
- NAME_FIELD_SIZE) == 0)
- WARN ((0, 0,
+ || strcmp (continued_file_name, real_s_name))
+ {
+ if ((archive_format == GNU_FORMAT || archive_format == OLDGNU_FORMAT)
+ && strlen (real_s_name) >= NAME_FIELD_SIZE
+ && strncmp (continued_file_name, real_s_name,
+ NAME_FIELD_SIZE) == 0)
+ WARN ((0, 0,
- quote (real_s_name)));
- else
- {
- WARN ((0, 0, _("%s is not continued on this volume"),
- quote (real_s_name)));
- return false;
- }
- }
+ quote (real_s_name)));
+ else
+ {
+ WARN ((0, 0, _("%s is not continued on this volume"),
+ quote (real_s_name)));
+ return false;
+ }
+ }
s = continued_file_size + continued_file_offset;
if (real_s_totsize != s || s < continued_file_offset)
s = continued_file_size + continued_file_offset;
if (real_s_totsize != s || s < continued_file_offset)
- {
- char totsizebuf[UINTMAX_STRSIZE_BOUND];
- char s1buf[UINTMAX_STRSIZE_BOUND];
- char s2buf[UINTMAX_STRSIZE_BOUND];
-
- WARN ((0, 0, _("%s is the wrong size (%s != %s + %s)"),
- quote (continued_file_name),
- STRINGIFY_BIGINT (save_totsize, totsizebuf),
- STRINGIFY_BIGINT (continued_file_size, s1buf),
- STRINGIFY_BIGINT (continued_file_offset, s2buf)));
- return false;
- }
+ {
+ char totsizebuf[UINTMAX_STRSIZE_BOUND];
+ char s1buf[UINTMAX_STRSIZE_BOUND];
+ char s2buf[UINTMAX_STRSIZE_BOUND];
+
+ WARN ((0, 0, _("%s is the wrong size (%s != %s + %s)"),
+ quote (continued_file_name),
+ STRINGIFY_BIGINT (save_totsize, totsizebuf),
+ STRINGIFY_BIGINT (continued_file_size, s1buf),
+ STRINGIFY_BIGINT (continued_file_offset, s2buf)));
+ return false;
+ }
- {
- char totsizebuf[UINTMAX_STRSIZE_BOUND];
- char s1buf[UINTMAX_STRSIZE_BOUND];
- char s2buf[UINTMAX_STRSIZE_BOUND];
-
- WARN ((0, 0, _("This volume is out of sequence (%s - %s != %s)"),
- STRINGIFY_BIGINT (real_s_totsize, totsizebuf),
- STRINGIFY_BIGINT (real_s_sizeleft, s1buf),
- STRINGIFY_BIGINT (continued_file_offset, s2buf)));
-
- return false;
- }
+ {
+ char totsizebuf[UINTMAX_STRSIZE_BOUND];
+ char s1buf[UINTMAX_STRSIZE_BOUND];
+ char s2buf[UINTMAX_STRSIZE_BOUND];
+
+ WARN ((0, 0, _("This volume is out of sequence (%s - %s != %s)"),
+ STRINGIFY_BIGINT (real_s_totsize, totsizebuf),
+ STRINGIFY_BIGINT (real_s_sizeleft, s1buf),
+ STRINGIFY_BIGINT (continued_file_offset, s2buf)));
+
+ return false;
+ }
strcpy (string, volume_label_option);
strcat (string, VOLUME_LABEL_APPEND);
result = fnmatch (string, label->header.name, 0) == 0;
strcpy (string, volume_label_option);
strcat (string, VOLUME_LABEL_APPEND);
result = fnmatch (string, label->header.name, 0) == 0;
if (!label)
FATAL_ERROR ((0, 0, _("Archive not labeled to match %s"),
if (!label)
FATAL_ERROR ((0, 0, _("Archive not labeled to match %s"),
if (!check_label_pattern (label))
FATAL_ERROR ((0, 0, _("Volume %s does not match %s"),
if (!check_label_pattern (label))
FATAL_ERROR ((0, 0, _("Volume %s does not match %s"),
- quote_n (0, label->header.name),
- quote_n (1, volume_label_option)));
+ quote_n (0, label->header.name),
+ quote_n (1, volume_label_option)));
strcpy (label->header.name, volume_label_option);
assign_string (¤t_stat_info.file_name,
strcpy (label->header.name, volume_label_option);
assign_string (¤t_stat_info.file_name,
label->header.typeflag = GNUTYPE_VOLHDR;
TIME_TO_CHARS (start_time.tv_sec, label->header.mtime);
label->header.typeflag = GNUTYPE_VOLHDR;
TIME_TO_CHARS (start_time.tv_sec, label->header.mtime);
char buf[UINTMAX_STRSIZE_BOUND];
char *p = STRINGIFY_BIGINT (volno, buf);
char *s = xmalloc (strlen (volume_label_option) + sizeof VOL_SUFFIX
char buf[UINTMAX_STRSIZE_BOUND];
char *p = STRINGIFY_BIGINT (volno, buf);
char *s = xmalloc (strlen (volume_label_option) + sizeof VOL_SUFFIX
sprintf (s, "%s %s %s", volume_label_option, VOL_SUFFIX, p);
_write_volume_label (s);
free (s);
sprintf (s, "%s %s %s", volume_label_option, VOL_SUFFIX, p);
_write_volume_label (s);
free (s);
st.stat.st_uid = getuid ();
st.stat.st_gid = getgid ();
st.orig_file_name = xheader_format_name (&st,
st.stat.st_uid = getuid ();
st.stat.st_gid = getgid ();
st.orig_file_name = xheader_format_name (&st,
st.file_name = st.orig_file_name;
st.archive_file_size = st.stat.st_size = real_s_sizeleft;
block_ordinal = current_block_ordinal ();
blk = start_header (&st);
if (!blk)
st.file_name = st.orig_file_name;
st.archive_file_size = st.stat.st_size = real_s_sizeleft;
block_ordinal = current_block_ordinal ();
blk = start_header (&st);
if (!blk)
finish_header (&st, blk, block_ordinal);
free (st.orig_file_name);
}
finish_header (&st, blk, block_ordinal);
free (st.orig_file_name);
}
- _("%s: file name too long to be stored in a GNU multivolume header, truncated"),
- quotearg_colon (real_s_name)));
+ _("%s: file name too long to be stored in a GNU multivolume header, truncated"),
+ quotearg_colon (real_s_name)));
OFF_TO_CHARS (real_s_sizeleft, block->header.size);
OFF_TO_CHARS (real_s_totsize - real_s_sizeleft,
OFF_TO_CHARS (real_s_sizeleft, block->header.size);
OFF_TO_CHARS (real_s_totsize - real_s_sizeleft,
- {
- assign_string (&real_s_name,
- safer_name_suffix (save_name, false,
- absolute_names_option));
- real_s_totsize = save_totsize;
- real_s_sizeleft = save_sizeleft;
- }
+ {
+ assign_string (&real_s_name,
+ safer_name_suffix (save_name, false,
+ absolute_names_option));
+ real_s_totsize = save_totsize;
+ real_s_sizeleft = save_sizeleft;
+ }
}
for (;;)
{
status = rmtread (archive, record_start->buffer, record_size);
if (status == record_size)
}
for (;;)
{
status = rmtread (archive, record_start->buffer, record_size);
if (status == record_size)
{
status = rmtread (archive, record_start->buffer, record_size);
if (status == record_size)
{
status = rmtread (archive, record_start->buffer, record_size);
if (status == record_size)
- || (status > 0 && !read_full_records)
- This is incorrect since even if new_volume() succeeds, the
- subsequent call to rmtread will overwrite the chunk of data
- already read in the buffer, so the processing will fail */
+ || (status > 0 && !read_full_records)
+ This is incorrect since even if new_volume() succeeds, the
+ subsequent call to rmtread will overwrite the chunk of data
+ already read in the buffer, so the processing will fail */
- || (status == SAFE_READ_ERROR && errno == ENOSPC))
- && multi_volume_option)
- {
- while (!try_new_volume ())
- ;
- return;
- }
+ || (status == SAFE_READ_ERROR && errno == ENOSPC))
+ && multi_volume_option)
+ {
+ while (!try_new_volume ())
+ ;
+ return;
+ }
if (multi_volume_option && wrt < bytes_written)
{
/* The value of bytes_written has changed while moving data;
if (multi_volume_option && wrt < bytes_written)
{
/* The value of bytes_written has changed while moving data;
- that means that flush_archive was executed at least once in
- between, and, as a consequence, copy_size bytes were not written
- to disk. We need to update sizeleft variables to compensate for
+ that means that flush_archive was executed at least once in
+ between, and, as a consequence, copy_size bytes were not written
+ to disk. We need to update sizeleft variables to compensate for