]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/record.c
Merge branch 'master' into readline-bconsole-restore
[bacula/bacula] / bacula / src / stored / record.c
index e20b4ccd54877d7a07769bc11d70ebb875442069..c1582aa5c2a4e895981ec67ab697d9f96b06321c 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   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.
@@ -422,6 +422,10 @@ bool can_write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec)
    return true;
 }
 
+uint64_t get_record_address(DEV_RECORD *rec)
+{
+   return ((uint64_t)rec->File)<<32 | rec->Block;
+}
 
 /*
  * Read a Record from the block
@@ -444,15 +448,14 @@ bool read_record_from_block(DCR *dcr, DEV_BLOCK *block, DEV_RECORD *rec)
    char buf1[100], buf2[100];
 
    remlen = block->binbuf;
-   rec->Block = block->BlockNumber;
-   rec->File = ((DEVICE *)block->dev)->file;
 
    /* Clear state flags */
    rec->state = 0;
    if (block->dev->is_tape()) {
       rec->state |= REC_ISTAPE;
    }
-
+   rec->Block = ((DEVICE *)block->dev)->EndBlock;
+   rec->File = ((DEVICE *)block->dev)->EndFile;
 
    /*
     * Get the header. There is always a full header,