Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
} else {
d_open = ::open;
d_close = ::close;
- d_ioctl = win32_ioctl; /* dummy function */
- d_write = win32_write; /* win32 read/write are not POSIX */
+ d_ioctl = win32_ioctl; /* dummy function */
+ d_write = win32_write; /* win32 read/write are not POSIX */
d_read = win32_read;
}
#else /* POSIX / UNIX Interface */
- if (is_vtape()) { /* test backend */
- d_open = vtape_open; /* vtape isn't available for WIN32 or FreeBSD */
+ if (is_vtape()) { /* test backend */
+ d_open = vtape_open; /* vtape isn't available for WIN32 or FreeBSD */
d_write = vtape_write;
d_close = vtape_close;
d_ioctl = vtape_ioctl;
d_read = vtape_read;
- } else { /* tape and file are using normal io */
+ } else { /* tape and file are using normal io */
d_open = ::open;
d_write = ::write;
d_close = ::close;
{
struct mtop mt_com;
int stat;
- Dmsg0(129, "weof_dev\n");
+ Dmsg1(129, "=== weof_dev=%s\n", print_name());
if (!is_open()) {
dev_errno = EBADF;
}
+/*
+ * Set to unload the current volume in the drive
+ */
+void DEVICE::set_unload()
+{
+ if (!m_unload && VolHdr.VolumeName[0] != 0) {
+ m_unload = true;
+ memcpy(UnloadVolName, VolHdr.VolumeName, sizeof(UnloadVolName));
+ }
+}
+
+
/*
* Clear volume header
*/
#if defined(HAVE_WIN32)
return ::_lseeki64(m_fd, (__int64)offset, whence);
#else
- return ::lseek(m_fd, (off_t)offset, whence);
+ return ::lseek(m_fd, offset, whence);
#endif
}
return -1;
dev->rem_wait_sec = dev->wait_sec;
dev->num_wait = 0;
dev->poll = false;
- dev->BadVolName[0] = 0;
jcr->min_wait = 60 * 60;
jcr->max_wait = 24 * 60 * 60;