]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/record.c
First stab at a simple script to dump the content of the complete Ingres bacula datab...
[bacula/bacula] / bacula / src / stored / record.c
index d2a12e6cf9a5a78fa88c6e07220d1ec6ffce391b..481eb8ae7d990e76db6ca7c41a605032fb9bd0df 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2010 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.
@@ -32,8 +32,6 @@
  *              Kern Sibbald, April MMI
  *                added BB02 format October MMII
  *
- *   Version $Id$
- *
  */
 
 
@@ -67,6 +65,12 @@ const char *FI_to_ascii(char *buf, int fi)
    case EOT_LABEL:
       return "EOT_LABEL";
       break;
+   case SOB_LABEL:
+      return "SOB_LABEL";
+      break;
+   case EOB_LABEL:
+      return "EOB_LABEL";
+      break;
    default:
      sprintf(buf, _("unknown: %d"), fi);
      return buf;
@@ -108,6 +112,8 @@ const char *stream_to_ascii(char *buf, int stream, int fi)
        return "GZIP";
     case STREAM_UNIX_ATTRIBUTES_EX:
        return "UNIX-ATTR-EX";
+    case STREAM_RESTORE_OBJECT:
+       return "RESTORE-OBJECT";
     case STREAM_SPARSE_DATA:
        return "SPARSE-DATA";
     case STREAM_SPARSE_GZIP_DATA:
@@ -156,6 +162,8 @@ const char *stream_to_ascii(char *buf, int stream, int fi)
        return "contGZIP";
     case -STREAM_UNIX_ATTRIBUTES_EX:
        return "contUNIX-ATTR-EX";
+    case -STREAM_RESTORE_OBJECT:
+       return "contRESTORE-OBJECT";
     case -STREAM_SPARSE_DATA:
        return "contSPARSE-DATA";
     case -STREAM_SPARSE_GZIP_DATA:
@@ -453,12 +461,9 @@ bool read_record_from_block(DCR *dcr, DEV_BLOCK *block, DEV_RECORD *rec)
    rec->state = 0;
    if (block->dev->is_tape()) {
       rec->state |= REC_ISTAPE;
-      rec->Block = block->BlockNumber;
-      rec->File = ((DEVICE *)block->dev)->file;
-   } else {
-      rec->Block = ((DEVICE *)block->dev)->EndBlock;
-      rec->File = ((DEVICE *)block->dev)->EndFile;
-   }   
+   }
+   rec->Block = ((DEVICE *)block->dev)->EndBlock;
+   rec->File = ((DEVICE *)block->dev)->EndFile;
 
    /*
     * Get the header. There is always a full header,