From d906566f78fce99abb37803eed9ebb4bf813acad Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 24 Feb 2011 17:55:00 +0100 Subject: [PATCH] Fix bug #1608 btape test failure when block size too big --- bacula/src/stored/btape.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index bc52836dbb..dc7ecabb47 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2010 Free Software Foundation Europe e.V. + Copyright (C) 2000-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -1112,7 +1112,13 @@ static bool write_two_files() int len, i, j; int *p; bool rc = false; /* bad return code */ + DEVICE *dev = dcr->dev; + /* + * Set big max_file_size so that write_record_to_block + * doesn't insert any additional EOF marks + */ + dev->max_file_size = 2 * num_recs * dev->max_block_size; Pmsg2(-1, _("\n=== Write, rewind, and re-read test ===\n\n" "I'm going to write %d records and an EOF\n" "then write %d records and an EOF, then rewind,\n" -- 2.39.5