dev->print_name());
return false;
} else {
- Dmsg1(130, "Wrote label of %d bytes to block\n", rec.data_len);
+ Dmsg2(130, "Wrote label of %d bytes to block. Vol=%s\n", rec.data_len,
+ dcr->VolumeName);
}
free_pool_memory(rec.data);
return true;
Dmsg0(200, "Error from write volume label.\n");
return false;
}
+ Dmsg1(150, "wrote vol label to block. Vol=%s\n", dcr->VolumeName);
dev->VolCatInfo.VolCatBytes = 0; /* reset byte count */
return false;
}
if (recycle) {
+ Dmsg1(150, "Doing recycle. Vol=%s\n", dcr->VolumeName);
// volume_unused(dcr); /* mark volume unused */
if (!dev->truncate(dcr)) {
Jmsg2(jcr, M_FATAL, 0, _("Truncate error on device %s: ERR=%s\n"),
dev->VolCatInfo.VolCatWrites = 1;
dev->VolCatInfo.VolCatReads = 1;
}
- Dmsg0(150, "dir_update_vol_info. Set Append\n");
+ Dmsg1(150, "dir_update_vol_info. Set Append vol=%s\n", dcr->VolumeName);
bstrncpy(dev->VolCatInfo.VolCatStatus, "Append", sizeof(dev->VolCatInfo.VolCatStatus));
+ bstrncpy(dev->VolCatInfo.VolCatName, dcr->VolumeName, sizeof(dev->VolCatInfo.VolCatName));
if (!dir_update_volume_info(dcr, true, true)) { /* indicate doing relabel */
return false;
}
* End writing real Volume label (from pre-labeled tape), or recycling
* the volume.
*/
- Dmsg0(200, "OK from rewrite vol label.\n");
+ Dmsg1(150, "OK from rewrite vol label. Vol=%s\n", dcr->VolumeName);
return true;
}
ser_string(dev->VolHdr.ProgDate);
ser_end(rec->data, SER_LENGTH_Volume_Label);
+ bstrncpy(dcr->VolumeName, dev->VolHdr.VolumeName, sizeof(dcr->VolumeName));
rec->data_len = ser_length(rec->data);
rec->FileIndex = dev->VolHdr.LabelType;
rec->VolSessionId = jcr->VolSessionId;