From: Kern Sibbald Date: Sat, 8 Mar 2008 13:02:03 +0000 (+0000) Subject: kes Start implementation of VTL code X-Git-Tag: Release-7.0.0~4886 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ec9443b0b1e0de54a3b57c44e80f01a1ef69dee9;p=bacula%2Fbacula kes Start implementation of VTL code kes Fix Win32 build after adding new cats subroutine git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6556 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h index 49c8624028..e54b08ed67 100644 --- a/bacula/src/baconfig.h +++ b/bacula/src/baconfig.h @@ -82,6 +82,12 @@ void InitWinAPIWrapper(); #define OSDependentInit() InitWinAPIWrapper() +#define tape_open win32_tape_open +#define tape_ioctl win32_tape_ioctl +#define tape_read win32_tape_read +#define tape_write win32_tape_write +#define tape_close win32_tape_close + #define sbrk(x) 0 @@ -106,8 +112,8 @@ void InitWinAPIWrapper(); #define CATS_IMP_EXP #define OSDependentInit() -#define tape_open open -#define tape_ioctl ioctl +#define tape_open ::open +#define tape_ioctl ::ioctl #define tape_read ::read #define tape_write ::write #define tape_close ::close diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index 030bb3adff..b2c772e515 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -843,7 +843,7 @@ bool DEVICE::eod(DCR *dcr) block_num = file = 0; file_size = 0; file_addr = 0; - if (is_fifo() || is_prog()) { + if (is_fifo()) { return true; } if (!is_tape()) { @@ -1845,6 +1845,7 @@ void DEVICE::close() } switch (dev_type) { + case B_VTL_DEV: case B_TAPE_DEV: unlock_door(); tape_close(m_fd); @@ -1921,6 +1922,7 @@ bool DEVICE::truncate(DCR *dcr) /* We need the DCR for DVD-writing */ Dmsg1(100, "truncate %s\n", print_name()); switch (dev_type) { + case B_VTL_DEV: case B_TAPE_DEV: /* maybe we should rewind and write and eof ???? */ return true; /* we don't really truncate tapes */ diff --git a/bacula/src/stored/dev.h b/bacula/src/stored/dev.h index b5ea0c63ef..656044e323 100644 --- a/bacula/src/stored/dev.h +++ b/bacula/src/stored/dev.h @@ -64,7 +64,7 @@ enum { B_TAPE_DEV, B_DVD_DEV, B_FIFO_DEV, - B_PROG_DEV + B_VTL_DEV }; /* Generic status bits returned from status_dev() */ @@ -277,7 +277,7 @@ public: int is_file() const { return dev_type == B_FILE_DEV; } int is_fifo() const { return dev_type == B_FIFO_DEV; } int is_dvd() const { return dev_type == B_DVD_DEV; } - int is_prog() const { return dev_type == B_PROG_DEV; } + int is_vtl() const { return dev_type == B_VTL_DEV; } int is_open() const { return m_fd >= 0; } int is_offline() const { return state & ST_OFFLINE; } int is_labeled() const { return state & ST_LABEL; } diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index 8f79c44ffc..877c4a51d8 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -212,6 +212,7 @@ static s_kw dev_types[] = { {"tape", B_TAPE_DEV}, {"dvd", B_DVD_DEV}, {"fifo", B_FIFO_DEV}, + {"vtl", B_VTL_DEV}, {NULL, 0} }; diff --git a/bacula/src/version.h b/bacula/src/version.h index e2a9135356..8e2bdbd01d 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.3.12" -#define BDATE "06 March 2008" -#define LSMDATE "06Mar08" +#define BDATE "08 March 2008" +#define LSMDATE "08Mar08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 321d127d59..c60a9802a5 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -1,6 +1,9 @@ Technical notes on version 2.3 General: +08Mar08 +kes Start implementation of VTL code +kes Fix Win32 build after adding new cats subroutine. 06Mar08 kes First cut at Duplicate Job implementation. 05Mar08