]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/btape.c
ebl First cup of faketape dummy tape driver for regression testing.
[bacula/bacula] / bacula / src / stored / btape.c
index d966a881f0939afbbc07e9571f11fd02cda8bdab..a92d01e215129b6e8e775def821fd838a361fc95 100644 (file)
 #include "bacula.h"
 #include "stored.h"
 
+#ifdef USE_FAKETAPE
+#include "faketape.h"
+#endif
+
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 
@@ -2675,7 +2679,7 @@ bool dir_find_next_appendable_volume(DCR *dcr)
    return dcr->VolumeName[0] != 0;
 }
 
-bool dir_ask_sysop_to_mount_volume(DCR *dcr)
+bool dir_ask_sysop_to_mount_volume(DCR *dcr, int /* mode */)
 {
    DEVICE *dev = dcr->dev;
    Dmsg0(20, "Enter dir_ask_sysop_to_mount_volume\n");
@@ -2732,6 +2736,7 @@ static bool my_mount_next_read_volume(DCR *dcr)
    Pmsg2(000, _("End of Volume \"%s\" %d records.\n"), dcr->VolumeName,
       quickie_count);
 
+   volume_unused(dcr);             /* release current volume */
    if (LastBlock != block->BlockNumber) {
       VolBytes += block->block_len;
    }