case VOL_NO_LABEL:
if (!write_new_volume_label_to_dev(dcr, newname, poolname,
relabel, true /* write dvd now */)) {
- dir->fsend(_("3912 Failed to label Volume: ERR=%s\n"), dev->bstrerror());
+ dir->fsend(_("3912 Failed to label Volume: ERR=%s\n"), dcr->jcr->errmsg);
break;
}
bstrncpy(dcr->VolumeName, newname, sizeof(dcr->VolumeName));
type, newname, dev->print_name());
break;
case VOL_TYPE_ERROR:
- dir->fsend(_("3915 Failed to label Volume: ERR=%s\n"), dev->errmsg);
+ dir->fsend(_("3912 Failed to label Volume: ERR=%s\n"), dcr->jcr->errmsg);
break;
case VOL_NO_MEDIA:
- dir->fsend(_("3914 Failed to label Volume (no media): ERR=%s\n"), dev->bstrerror());
+ dir->fsend(_("3914 Failed to label Volume (no media): ERR=%s\n"), dcr->jcr->errmsg);
break;
default:
dir->fsend(_("3913 Cannot label Volume. "
if (VolCatInfo.VolCatName[0] == 0) {
Mmsg(errmsg, _("Could not open file device %s. No Volume name given.\n"),
print_name());
+ if (dcr->jcr) {
+ pm_strcpy(dcr->jcr->errmsg, errmsg);
+ }
clear_opened();
return;
}
if (fstat(m_fd, &sp) == 0) {
devno = sp.st_dev;
}
+ } else {
+ if (dcr->jcr) {
+ pm_strcpy(dcr->jcr->errmsg, errmsg);
+ }
}
Dmsg1(100, "open dev: disk fd=%d opened\n", m_fd);
}
Mmsg3(jcr->errmsg, _("Could not reserve volume %s on %s device %s\n"),
dev->VolHdr.VolumeName, dev->print_type(), dev->print_name());
}
- Dmsg2(150, "Could not reserve volume %s on %s\n", dev->VolHdr.VolumeName, dev->print_name());
+ Dmsg2(100, "Could not reserve volume %s on %s\n", dev->VolHdr.VolumeName, dev->print_name());
stat = VOL_NAME_ERROR;
goto bail_out;
}
Dmsg0(150, "write_volume_label()\n");
if (*VolName == 0) {
+ if (dcr->jcr) {
+ Mmsg(dcr->jcr->errmsg, "ERROR: new_volume_label_to_dev called with NULL VolName\n");
+ }
Pmsg0(0, "=== ERROR: write_new_volume_label_to_dev called with NULL VolName\n");
goto bail_out;
}
berrno be;
Mmsg2(errmsg, _("Unable to open device %s: ERR=%s\n"),
print_name(), be.bstrerror(dev_errno));
+ if (dcr->jcr) {
+ pm_strcpy(dcr->jcr->errmsg, errmsg);
+ }
Dmsg1(100, "%s", errmsg);
}