51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <system-ioctl.h>
#include <signal.h>
#include <closeout.h>
#include <fnmatch.h>
+#include <getline.h>
#include <human.h>
#include <quotearg.h>
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
static void
init_buffer ()
{
- if (!record_buffer[record_index])
- page_aligned_alloc (&record_buffer[record_index], record_size);
+ if (! record_buffer_aligned[record_index])
+ record_buffer_aligned[record_index] =
+ page_aligned_alloc (&record_buffer[record_index], record_size);
- record_start = record_buffer[record_index];
+ record_start = record_buffer_aligned[record_index];
current_block = record_start;
record_end = record_start + blocking_factor;
}
{
static FILE *read_file;
static int looped;
+ int prompt;
if (!read_file && !info_script_option)
/* FIXME: if fopen is used, it will never be closed. */
archive_name_cursor = archive_name_array;
looped = 1;
}
+ prompt = looped;
tryagain:
- if (looped)
+ if (prompt)
{
/* We have to prompt from now on. */
open_warn (*archive_name_cursor);
if (!verify_option && mode == ACCESS_WRITE && backup_option)
undo_last_backup ();
+ prompt = 1;
goto tryagain;
}