]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/mount.c
Add V: to bextract and bscan
[bacula/bacula] / bacula / src / stored / mount.c
index 4efe9b3641801ad8e439757945296458c4d40856..816c830e45110cb03c06be31caa53866563b1545 100644 (file)
@@ -63,7 +63,6 @@ mount_next_vol:
    recycle = ask = autochanger = 0;
    if (release) {
       Dmsg0(100, "mount_next_volume release=1\n");
-
       release_volume(jcr, dev);
       ask = 1;                       /* ask operator to mount tape */
    }
@@ -96,7 +95,6 @@ mount_next_vol:
 
    dev->state &= ~(ST_APPEND|ST_READ|ST_EOT|ST_WEOT|ST_EOF);
 
-   jcr->VolFirstIndex = jcr->JobFiles; /* first update of Vol FileIndex */
    for ( ;; ) {
       int vol_label_status;
       autochanger = autoload_device(jcr, dev, 1, NULL);
@@ -361,16 +359,19 @@ int mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
    return 0;
 }
 
+/*
+ * Either because we are going to hang a new volume, or because
+ *  of explicit user request, we release the current volume.
+ */
 void release_volume(JCR *jcr, DEVICE *dev)
 {
-   /********FIXME******* if WroteVol, must write JobMedia record */
-   /* 
-    * First erase all memory of the current volume   
-    */
 
    if (jcr->WroteVol) {
-      Jmsg0(jcr, M_ERROR, 0, "Hey!!!!! WriteVol non-zero !!!!!\n");
+      Jmsg0(jcr, M_ERROR, 0, "Hey!!!!! WroteVol non-zero !!!!!\n");
    }
+   /* 
+    * First erase all memory of the current volume   
+    */
    dev->block_num = dev->file = 0;
    dev->EndBlock = dev->EndFile = 0;
    memset(&dev->VolCatInfo, 0, sizeof(dev->VolCatInfo));