]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/btape.c
ebl rename faketape to vtape
[bacula/bacula] / bacula / src / stored / btape.c
index f469691fd103fdb90b6dda493a53f9b661fecac5..95ecfc43e175ca4308d15135cad3b4dfae87a969 100644 (file)
 #include "bacula.h"
 #include "stored.h"
 
+#ifdef USE_VTAPE
+#include "vtape.h"
+#endif
+
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 
@@ -2500,11 +2504,7 @@ static void rawfill_cmd()
    Pmsg1(0, _("Begin writing raw blocks of %u bytes.\n"), block->buf_len);
    for ( ;; ) {
       *p = block_num;
-      if (dev->is_tape()) {
-         stat = tape_write(dev->fd(), block->buf, block->buf_len);
-      } else {
-         stat = write(dev->fd(), block->buf, block->buf_len);
-      }
+      stat = dev->d_write(dev->fd(), block->buf, block->buf_len);
       if (stat == (int)block->buf_len) {
          if ((block_num++ % 100) == 0) {
             printf("+");