X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Frecord.c;h=c1582aa5c2a4e895981ec67ab697d9f96b06321c;hb=3fe17b53281b5b18437a63036251e62bb6a5a414;hp=e20b4ccd54877d7a07769bc11d70ebb875442069;hpb=fbfd7b610e3de694115ec6c371741c565c8e5d40;p=bacula%2Fbacula diff --git a/bacula/src/stored/record.c b/bacula/src/stored/record.c index e20b4ccd54..c1582aa5c2 100644 --- a/bacula/src/stored/record.c +++ b/bacula/src/stored/record.c @@ -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,