]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dev.h
kes Apply Richard Mortimer's patches for printing an error
[bacula/bacula] / bacula / src / stored / dev.h
index e52f19e0c0b1c1448330636097b65862c5b537c8..a7b775a3ad444e39eeb1075b8e68a033f8de1eb6 100644 (file)
@@ -162,7 +162,7 @@ struct VOLUME_CAT_INFO {
    uint32_t EndFile;                  /* Last file number */
    uint32_t EndBlock;                 /* Last block number */
    int32_t  LabelType;                /* Bacula/ANSI/IBM */
-   int32_t  Slot;                     /* Slot in changer */
+   int32_t  Slot;                     /* >0=Slot loaded, 0=nothing, -1=unknown */
    bool     InChanger;                /* Set if vol in current magazine */
    uint32_t VolCatMaxJobs;            /* Maximum Jobs to write to volume */
    uint32_t VolCatMaxFiles;           /* Maximum files to write to volume */
@@ -241,11 +241,12 @@ public:
    uint64_t part_size;                /* current part size */
    uint32_t part;                     /* current part number (starts at 0) */
    uint64_t part_start;               /* current part start address (relative to the whole volume) */
-   uint32_t num_parts;                /* number of parts WRITTEN on the DVD */
+   uint32_t num_dvd_parts;            /* number of parts WRITTEN on the DVD */
    /* state ST_FREESPACE_OK is set if free_space is valid */
    uint64_t free_space;               /* current free space on medium (without the current part) */
    int free_space_errno;              /* indicates errno getting freespace */
    bool truncating;                   /* if set, we are currently truncating the DVD */
+   bool truncated_dvd;                /* if set, we have a truncated DVD in the drive */
    
    
    utime_t  vol_poll_interval;        /* interval between polling Vol mount */
@@ -323,7 +324,8 @@ public:
    void set_short_block() { state |= ST_SHORT; };
    void set_freespace_ok() { state |= ST_FREESPACE_OK; }
    void set_part_spooled(int val) { if (val) state |= ST_PART_SPOOLED; \
-          else state &= ~ST_PART_SPOOLED; };
+          else state &= ~ST_PART_SPOOLED;
+   };
    void set_mounted(int val) { if (val) state |= ST_MOUNTED; \
           else state &= ~ST_MOUNTED; };
    void clear_append() { state &= ~ST_APPEND; };
@@ -342,6 +344,7 @@ public:
    void block(int why);          /* in dev.c */
    void unblock();               /* in dev.c */
    void close();                 /* in dev.c */
+   void close_part(DCR *dcr);    /* in dev.c */
    bool truncate(DCR *dcr);      /* in dev.c */
    int open(DCR *dcr, int mode); /* in dev.c */
    void term(void);              /* in dev.c */
@@ -399,6 +402,8 @@ public:
    int spool_fd;                      /* fd if spooling */
    bool spool_data;                   /* set to spool data */
    bool spooling;                     /* set when actually spooling */
+   bool despooling;                   /* set when despooling */
+   bool despool_wait;                 /* waiting for despooling */
    bool dev_locked;                   /* set if dev already locked */
    bool NewVol;                       /* set if new Volume mounted */
    bool WroteVol;                     /* set if Volume written */