/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
* daemon. More complicated coding (double buffering, writer
* thread, ...) is left for a later version.
*
- * Version $Id$
*/
/*
}
}
if (dcr) {
- bstrncpy(VolCatInfo.VolCatName, dcr->VolumeName, sizeof(VolCatInfo.VolCatName));
+ VolCatInfo = dcr->VolCatInfo; /* structure assign */
}
Dmsg4(100, "open dev: type=%d dev_name=%s vol=%s mode=%s\n", dev_type,
- print_name(), VolCatInfo.VolCatName, mode_to_str(omode));
+ print_name(), getVolCatName(), mode_to_str(omode));
state &= ~(ST_LABEL|ST_APPEND|ST_READ|ST_EOT|ST_WEOT|ST_EOF);
label_type = B_BACULA_LABEL;
if (is_tape() || is_fifo()) {
if (!IsPathSeparator(archive_name.c_str()[strlen(archive_name.c_str())-1])) {
pm_strcat(archive_name, "/");
}
- pm_strcat(archive_name, VolCatInfo.VolCatName);
+ pm_strcat(archive_name, getVolCatName());
}
mount(1); /* do mount if required */
}
/*
- * Open a DVD device. N.B. at this point, dcr->VolCatInfo.VolCatName
- * (NB:??? I think it's VolCatInfo.VolCatName that is right)
+ * Open a DVD device. N.B. at this point, dcr->getVolCatName()
+ * (NB:??? I think it's getVolCatName() that is right)
* has the desired Volume name, but there is NO assurance that
* any other field of VolCatInfo is correct.
*/
* copy here, when opening.
*/
VolCatInfo = dcr->VolCatInfo; /* structure assignment */
- Dmsg1(100, "Volume=%s\n", VolCatInfo.VolCatName);
+ Dmsg1(100, "Volume=%s\n", getVolCatName());
if (VolCatInfo.VolCatName[0] == 0) {
Dmsg1(10, "Could not open DVD device %s. No Volume name given.\n",
{
Dmsg1(100, "Clear volhdr vol=%s\n", VolHdr.VolumeName);
memset(&VolHdr, 0, sizeof(VolHdr));
+ setVolCatInfo(false);
}
char *
dev_vol_name(DEVICE *dev)
{
- return dev->VolCatInfo.VolCatName;
+ return dev->getVolCatName();
}