* Version $Id$
*/
/*
- Copyright (C) 2005-2006 Kern Sibbald
+ Bacula® - The Network Backup Solution
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as amended with additional clauses defined in the
- file LICENSE in the main source directory.
+ Copyright (C) 2005-2006 Free Software Foundation Europe e.V.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- the file LICENSE for additional details.
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
- */
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
#include "bacula.h"
#include "stored.h"
if (dev->can_append() && (dev->part > dev->num_dvd_parts) &&
(dev->part_size == 0)) {
Dmsg0(29, "open_next_part exited immediately (dev->part_size == 0).\n");
- return dev->fd;
+ return dev->fd();
}
dev->close_part(dcr); /* close current part */
}
dev->set_labeled(); /* all next parts are "labeled" */
- return dev->fd;
+ return dev->fd();
}
/*
boffset_t pos;
char ed1[50], ed2[50];
- Dmsg5(400, "Enter lseek_dvd fd=%d off=%s w=%d part=%d nparts=%d\n", dev->fd,
+ Dmsg5(400, "Enter lseek_dvd fd=%d off=%s w=%d part=%d nparts=%d\n", dev->fd(),
edit_int64(offset, ed1), whence, dev->part, dev->num_dvd_parts);
switch(whence) {
(uint64_t)offset < dev->part_start+dev->part_size) {
/* We are staying in the current part, just seek */
#if defined(HAVE_WIN32)
- pos = _lseeki64(dev->fd, offset-dev->part_start, SEEK_SET);
+ pos = _lseeki64(dev->fd(), offset-dev->part_start, SEEK_SET);
#else
- pos = lseek(dev->fd, offset-dev->part_start, SEEK_SET);
+ pos = lseek(dev->fd(), offset-dev->part_start, SEEK_SET);
#endif
if (pos < 0) {
return pos;
break;
case SEEK_CUR:
Dmsg1(400, "lseek_dvd SEEK_CUR to %s\n", edit_int64(offset, ed1));
- if ((pos = lseek(dev->fd, (off_t)0, SEEK_CUR)) < 0) {
+ if ((pos = lseek(dev->fd(), (off_t)0, SEEK_CUR)) < 0) {
Dmsg0(400, "Seek error.\n");
return pos;
}
* right part number, simply seek
*/
if (dev->is_part_spooled() && dev->part > dev->num_dvd_parts) {
- if ((pos = lseek(dev->fd, (off_t)0, SEEK_END)) < 0) {
+ if ((pos = lseek(dev->fd(), (off_t)0, SEEK_END)) < 0) {
return pos;
} else {
Dmsg1(400, "lseek_dvd SEEK_END returns %s\n",