Dmsg0(150, "write_volume_label()\n");
empty_block(dcr->block);
+ if (*VolName == 0) {
+ Pmsg0(0, "=== ERROR: write_new_volume_label_to_dev called with NULL VolName\n");
+ goto bail_out;
+ }
if (relabel) {
volume_unused(dcr); /* mark current volume unused */
/* Create a new Volume label and write it to the device */
if (!write_new_volume_label_to_dev(dcr, VolumeName,
pool_name, false, /* no relabel */ false /* defer DVD label */)) {
- Dmsg0(150, "!write_vol_label\n");
+ Dmsg2(150, "write_vol_label failed. vol=%s, pool=%s\n",
+ VolumeName, pool_name);
if (opened) {
mark_volume_in_error();
}