]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.h
Additional message plus exclusion fix
[bacula/bacula] / bacula / src / stored / block.h
index 90f10a06ddc7d86328806857b1823a031d2cdbd3..9d9c98267c5690d133e42e09edbc2d8ac4bd2f4e 100644 (file)
@@ -7,7 +7,7 @@
  *
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -84,6 +84,7 @@
  */
 typedef struct s_dev_block {
    struct s_dev_block *next;          /* pointer to next one */
+   void *dev;                         /* pointer to device (DEVICE not defined yet) */
    /* binbuf is the number of bytes remaining
     * in the buffer. For writes, it is bytes not yet written.
     * For reads, it is remaining bytes not yet read.
@@ -92,7 +93,7 @@ typedef struct s_dev_block {
    uint32_t block_len;                /* length of current block read */
    uint32_t buf_len;                  /* max/default block length */
    uint32_t BlockNumber;              /* sequential block number */
-   uint32_t read_len;                 /* bytes read into buffer */  
+   uint32_t read_len;                 /* bytes read into buffer, if zero, block empty */
    uint32_t VolSessionId;             /* */
    uint32_t VolSessionTime;           /* */
    int      BlockVer;                 /* block version 1 or 2 */
@@ -103,4 +104,6 @@ typedef struct s_dev_block {
                                        */
 } DEV_BLOCK;
 
+#define block_is_empty(block) !((block)->read_len)
+
 #endif