Dmsg0(200, "Error from write volume label.\n");
return false;
}
+
+ dev->VolCatInfo.VolCatBytes = 0; /* reset byte count */
+
/*
* If we are not dealing with a streaming device,
* write the block now to ensure we have write permission.
/* Set or reset Volume statistics */
dev->VolCatInfo.VolCatJobs = 0;
dev->VolCatInfo.VolCatFiles = 0;
- dev->VolCatInfo.VolCatBytes = 1;
dev->VolCatInfo.VolCatErrors = 0;
dev->VolCatInfo.VolCatBlocks = 0;
dev->VolCatInfo.VolCatRBytes = 0;
bstrncpy(dev->VolHdr.Id, BaculaId, sizeof(dev->VolHdr.Id));
dev->VolHdr.VerNum = BaculaTapeVersion;
- if (dev->is_dvd()) {
+ if (dev->is_dvd() && dvdnow) {
/* We do not want to re-label a DVD so write VOL_LABEL now */
dev->VolHdr.LabelType = VOL_LABEL;
} else {
return false;
}
- Dmsg6(20, "Write sesson_label record JobId=%d FI=%s SessId=%d Strm=%s len=%d "
+ Dmsg6(50, "Write sesson_label record JobId=%d FI=%s SessId=%d Strm=%s len=%d "
"remainder=%d\n", jcr->JobId,
FI_to_ascii(buf1, rec->FileIndex), rec->VolSessionId,
stream_to_ascii(buf2, rec->Stream, rec->FileIndex), rec->data_len,
rec->remainder);
free_record(rec);
- Dmsg2(20, "Leave write_session_label Block=%d File=%d\n",
+ Dmsg2(50, "Leave write_session_label Block=%d File=%d\n",
dev->block_num, dev->file);
return true;
}