]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/autochanger.c
Simplify two messages in acquire.c
[bacula/bacula] / bacula / src / stored / autochanger.c
index fbfa32a75cbea728c708e95df73b7232f094331f..7f3bea26f35fe645ee3fffe8e853451b2690c420 100644 (file)
@@ -130,6 +130,16 @@ int autoload_device(JCR *jcr, DEVICE *dev, int writing, BSOCK *dir)
    return rtn_stat;
 }
 
+void invalidate_slot_in_catalog(JCR *jcr)
+{
+   Jmsg(jcr, M_ERROR, 0, _("Autochanger Volume \"%s\" not found in slot %d.\n"
+"    Setting slot to zero in catalog.\n"),
+       jcr->VolCatInfo.VolCatName, jcr->VolCatInfo.Slot);
+   jcr->VolCatInfo.Slot = 0; /* invalidate slot */
+   Dmsg0(200, "update vol info in mount\n");
+   dir_update_volume_info(jcr, &jcr->VolCatInfo, 1);  /* set slot */
+}
+
 /*
  * List the Volumes that are in the autoloader possibly
  *   with their barcodes.