/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2010 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-2014 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.
- This program is Free Software; you can redistribute it and/or
- modify it under the terms of version three of the GNU Affero General Public
- License as published by the Free Software Foundation and included
- in the file LICENSE.
+ The main author of Bacula is Kern Sibbald, with contributions from many
+ others, a complete list can be found in the file AUTHORS.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
+ You may use this file and others of this release according to the
+ license defined in the LICENSE file, which includes the Affero General
+ Public License, v3.0 ("AGPLv3") and some additional permissions and
+ terms pursuant to its AGPLv3 Section 7.
Bacula® is a registered trademark of Kern Sibbald.
- The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
- Switzerland, email:ftf@fsfeurope.org.
*/
/*
* Match Bootstrap Records (used for restores) against
/*
* ***FIXME***
* Also for efficiency, once a bsr is done, it really should be
- * delinked from the bsr chain. This will avoid the above
+ * delinked from the bsr chain. This will avoid the above
* problem and make traversal of the bsr chain more efficient.
*
* To be done ...
* that has already been consumed, and this will cause the
* bsr to be used, thus we may seek back and re-read the
* same records, causing an error. This deficiency must
- * be fixed. For the moment, it has been kludged in
+ * be fixed. For the moment, it has been kludged in
* read_record.c to avoid seeking back if find_next_bsr
* returns a bsr pointing to a smaller address (file/block).
*
bsr_sfile = vf->sfile;
}
}
-
+
/* if the bsr file is less than the found_bsr file, return bsr */
if (found_bsr_sfile > bsr_sfile) {
return_bsr = bsr;
if (!match_volfile(bsr, bsr->volfile, rec, 1)) {
if (bsr->volfile) {
- Dmsg3(dbglevel, "Fail on file=%u. bsr=%u,%u\n",
+ Dmsg3(dbglevel, "Fail on file=%u. bsr=%u,%u\n",
rec->File, bsr->volfile->sfile, bsr->volfile->efile);
}
goto no_match;
if (!match_voladdr(bsr, bsr->voladdr, rec, 1)) {
if (bsr->voladdr) {
- Dmsg3(dbglevel, "Fail on Addr=%llu. bsr=%llu,%llu\n",
+ Dmsg3(dbglevel, "Fail on Addr=%llu. bsr=%llu,%llu\n",
get_record_address(rec), bsr->voladdr->saddr, bsr->voladdr->eaddr);
}
goto no_match;
rec->FileIndex, bsr->FileIndex->findex, bsr->FileIndex->findex2);
goto no_match;
}
- Dmsg3(dbglevel, "match on findex=%d. bsr=%d,%d\n",
- rec->FileIndex, bsr->FileIndex->findex, bsr->FileIndex->findex2);
+ if (bsr->FileIndex) {
+ Dmsg3(dbglevel, "match on findex=%d. bsr=%d,%d\n",
+ rec->FileIndex, bsr->FileIndex->findex, bsr->FileIndex->findex2);
+ }
if (!match_fileregex(bsr, rec, jcr)) {
- Dmsg1(dbglevel, "Fail on fileregex='%s'\n", bsr->fileregex);
+ Dmsg1(dbglevel, "Fail on fileregex='%s'\n", NPRT(bsr->fileregex));
goto no_match;
}
return 0;
}
-/*
+/*
* Note, we cannot mark bsr done based on session id because we may
* have interleaved records, and there may be more of what we want
* later.
bsr_addr = bsr->voladdr->saddr;
sfile = bsr_addr>>32;
sblock = (uint32_t)bsr_addr;
-
+
} else if (bsr->volfile && bsr->volblock) {
bsr_addr = (((uint64_t)bsr->volfile->sfile)<<32)|bsr->volblock->sblock;
sfile = bsr->volfile->sfile;