]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/match_bsr.c
Remove broken run when code
[bacula/bacula] / bacula / src / stored / match_bsr.c
old mode 100755 (executable)
new mode 100644 (file)
index 8968cf8..ffa8582
@@ -1,15 +1,7 @@
-/*
- *   Match Bootstrap Records (used for restores) against
- *     Volume Records
- *
- *     Kern Sibbald, June MMII
- *
- *   Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2007 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.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *   Match Bootstrap Records (used for restores) against
+ *     Volume Records
+ *
+ *     Kern Sibbald, June MMII
+ *
+ *   Version $Id$
+ */
 
 /*
  * ***FIXME***
@@ -60,7 +60,7 @@
 #include "lib/fnmatch.h"
 #endif
 
-const int dbglevel = 10;
+const int dbglevel = 500;
 
 /* Forward references */
 static int match_volume(BSR *bsr, BSR_VOLUME *volume, VOLUME_LABEL *volrec, bool done);
@@ -191,13 +191,10 @@ BSR *find_next_bsr(BSR *root_bsr, DEVICE *dev)
 {
    BSR *bsr;
    BSR *found_bsr = NULL;
-   bool no_file_seek = !dev->is_tape();
-#ifdef FILE_SEEK
-   no_file_seek = false;
-#endif
 
+   /* Do tape/disk seeking only if CAP_POSITIONBLOCKS is on */
    if (!root_bsr || !root_bsr->use_positioning ||
-       !root_bsr->reposition || no_file_seek) {
+       !root_bsr->reposition || !dev->has_cap(CAP_POSITIONBLOCKS)) {
       Dmsg2(dbglevel, "No nxt_bsr use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition);
       return NULL;
    }
@@ -330,7 +327,7 @@ static int match_all(BSR *bsr, DEV_RECORD *rec, VOLUME_LABEL *volrec,
                      SESSION_LABEL *sessrec, bool done)
 {
    if (bsr->done) {
-      Dmsg0(dbglevel, "bsr->done set\n");
+//    Dmsg0(dbglevel, "bsr->done set\n");
       goto no_match;
    }
    if (!match_volume(bsr, bsr->volume, volrec, 1)) {