]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/patches/testing/faketape.h
Commit NULL vol name patch
[bacula/bacula] / bacula / patches / testing / faketape.h
index 9fa5889915209a1a73dcc5b2e3e902efe8c91e7b..040f5a807543d20362ec9d7ade8f016308bc61ed 100644 (file)
@@ -38,7 +38,9 @@
 #include <stddef.h>
 #include "bacula.h"
 
-#define FTAPE_MAX_DRIVE 20
+#ifdef USE_FAKETAPE
+
+#define FTAPE_MAX_DRIVE 50
 
 /* 
  * Theses functions will replace open/read/write
@@ -52,25 +54,23 @@ void faketape_debug(int level);
 
 class faketape {
 private:
-   int         fd;             /* Our file descriptor */
+   int         fd;              /* Our file descriptor */
 
-   off_t       file_size;      /* size */
+   off_t       file_size;       /* size */
    off_t       max_block;
 
-   bool        atEOF;          /* End of file */
-   bool        atEOT;          /* End of media */
-   bool        atEOD;          /* End of data */
+   bool        atEOF;           /* End of file */
+   bool        atEOT;           /* End of media */
+   bool        atEOD;           /* End of data */
    bool        atBOT;           /* Begin of tape */
-   bool        online;         /* volume online */
-   bool        inplace;                /* have to seek before writing ? */
-   bool        needEOF;                /* check if last operation need eof */
-
-   POOLMEM     *volume;                /* volume name */
+   bool        online;          /* volume online */
+   bool        inplace;         /* have to seek before writing ? */
+   bool        needEOF;         /* check if last operation need eof */
 
-   int32_t     last_file;      /* last file of the volume */
-   int32_t     current_file;   /* max 65000 files */
-   int32_t     current_block;  /* max 4G blocks of 1KB */
-   off_t       current_pos;    /* current position in stream */
+   int32_t     last_file;       /* last file of the volume */
+   int32_t     current_file;    /* max 65000 files */
+   int32_t     current_block;   /* max 4G blocks of 1KB */
+   off_t       current_pos;     /* current position in stream */
 
    void destroy();
    int find_maxfile();
@@ -101,4 +101,5 @@ public:
    int tape_pos(struct mtpos *mt_com);
 };
 
+#endif /* USE_FAKETAPE */
 #endif /* !FAKETAPE_H */