X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fmount.c;h=a7485b04489eb9955900ee07ee062161d9ae8951;hb=7503a438c87931cf1748bd0fda3bb932e2af3346;hp=fdda8d2f011d134f122057c8a1cc408e60a40498;hpb=a5fc60132e4ed7a74d74044730e173deae1a24d2;p=bacula%2Fbacula diff --git a/bacula/src/stored/mount.c b/bacula/src/stored/mount.c index fdda8d2f01..a7485b0448 100644 --- a/bacula/src/stored/mount.c +++ b/bacula/src/stored/mount.c @@ -68,7 +68,7 @@ mount_next_vol: dcr->VolCatInfo.Slot = 0; if (!dir_ask_sysop_to_mount_volume(dcr)) { Jmsg(jcr, M_FATAL, 0, _("Too many errors trying to mount device %s.\n"), - dev_name(dev)); + dev->print_name()); return false; } } @@ -156,7 +156,8 @@ mount_next_vol: /* Ensure the device is open */ /* If we have a dvd that requires mount, we first want to guess * which Volume is loaded, so we continue (if the wrong device is - * loaded, open_device would fail). */ + * loaded, open_device just below would fail. + */ if (!dev->is_dvd()) { if (!open_device(dcr)) { if (dev->poll) { @@ -213,7 +214,7 @@ read_volume: /* If not removable, Volume is broken */ if (!dev_cap(dev, CAP_REM)) { Jmsg(jcr, M_WARNING, 0, _("Volume \"%s\" not on device %s.\n"), - dcr->VolumeName, dev_name(dev)); + dcr->VolumeName, dev->print_name()); mark_volume_in_error(dcr); goto mount_next_vol; } @@ -284,14 +285,17 @@ read_volume: return false; } Jmsg(jcr, M_INFO, 0, _("Labeled new Volume \"%s\" on device %s.\n"), - dcr->VolumeName, dev_name(dev)); + dcr->VolumeName, dev->print_name()); goto read_volume; /* read label we just wrote */ } /* If not removable, Volume is broken */ if (!dev_cap(dev, CAP_REM)) { Jmsg(jcr, M_WARNING, 0, _("Volume \"%s\" not on device %s.\n"), - dcr->VolumeName, dev_name(dev)); + dcr->VolumeName, dev->print_name()); mark_volume_in_error(dcr); + if (autochanger) { + mark_volume_not_inchanger(dcr); + } goto mount_next_vol; } /* NOTE! Fall-through wanted. */ @@ -338,8 +342,8 @@ read_volume: Jmsg(jcr, M_INFO, 0, _("Volume \"%s\" previously written, moving to end of data.\n"), dcr->VolumeName); if (!eod_dev(dev)) { - Jmsg(jcr, M_ERROR, 0, _("Unable to position to end of data on device \"%s\". ERR=%s\n"), - dev_name(dev), strerror_dev(dev)); + Jmsg(jcr, M_ERROR, 0, _("Unable to position to end of data on device %s: ERR=%s\n"), + dev->print_name(), strerror_dev(dev)); mark_volume_in_error(dcr); goto mount_next_vol; } @@ -404,7 +408,7 @@ bool mount_next_read_volume(DCR *dcr) close_dev(dev); dev->state &= ~ST_READ; if (!acquire_device_for_read(jcr, dev)) { - Jmsg2(jcr, M_FATAL, 0, "Cannot open Dev=%s, Vol=%s\n", dev_name(dev), + Jmsg2(jcr, M_FATAL, 0, "Cannot open Dev=%s, Vol=%s\n", dev->print_name(), dcr->VolumeName); return false; }