From e9ec2bf1509a97df3f03d90013be6d94da028034 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 9 Jun 2008 20:50:15 +0000 Subject: [PATCH] ebl rename faketape to vtape git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7124 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/Makefile.in | 12 ++++++------ bacula/src/stored/btape.c | 4 ++-- bacula/src/stored/dev.c | 20 ++++++++++---------- bacula/src/stored/dev.h | 6 +++--- bacula/src/stored/stored.h | 2 +- bacula/src/stored/stored_conf.c | 2 +- bacula/src/stored/{faketape.c => vtape.c} | 0 bacula/src/stored/{faketape.h => vtape.h} | 0 bacula/technotes-2.5 | 1 + 9 files changed, 24 insertions(+), 23 deletions(-) rename bacula/src/stored/{faketape.c => vtape.c} (100%) rename bacula/src/stored/{faketape.h => vtape.h} (100%) diff --git a/bacula/src/stored/Makefile.in b/bacula/src/stored/Makefile.in index d2e7ae8bb1..1b217f7abf 100644 --- a/bacula/src/stored/Makefile.in +++ b/bacula/src/stored/Makefile.in @@ -20,7 +20,7 @@ first_rule: all dummy: # bacula-sd -SDOBJS = stored.o ansi_label.o faketape.o \ +SDOBJS = stored.o ansi_label.o vtape.o \ autochanger.o acquire.o append.o \ askdir.o authenticate.o \ block.o butil.o dev.o \ @@ -31,33 +31,33 @@ SDOBJS = stored.o ansi_label.o faketape.o \ spool.o status.o stored_conf.o wait.o # btape -TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o faketape.o \ +TAPEOBJS = btape.o block.o butil.o dev.o device.o label.o vtape.o \ lock.o ansi_label.o dvd.o ebcdic.o \ autochanger.o acquire.o mount.o record.o read_record.o \ reserve.o \ stored_conf.o match_bsr.o parse_bsr.o scan.o spool.o wait.o # bls -BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o faketape.o \ +BLSOBJS = bls.o block.o butil.o device.o dev.o label.o match_bsr.o vtape.o \ ansi_label.o dvd.o ebcdic.o lock.o \ autochanger.o acquire.o mount.o parse_bsr.o record.o \ read_record.o reserve.o scan.o stored_conf.o spool.o wait.o # bextract -BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o faketape.o \ +BEXTOBJS = bextract.o block.o device.o dev.o label.o record.o vtape.o \ ansi_label.o dvd.o ebcdic.o lock.o \ autochanger.o acquire.o mount.o match_bsr.o parse_bsr.o butil.o \ pythonsd.o read_record.o reserve.o \ scan.o stored_conf.o spool.o wait.o # bscan -SCNOBJS = bscan.o block.o device.o dev.o label.o faketape.o \ +SCNOBJS = bscan.o block.o device.o dev.o label.o vtape.o \ ansi_label.o dvd.o ebcdic.o lock.o \ autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \ butil.o read_record.o scan.o reserve.o stored_conf.o spool.o wait.o # bcopy -COPYOBJS = bcopy.o block.o device.o dev.o label.o faketape.o \ +COPYOBJS = bcopy.o block.o device.o dev.o label.o vtape.o \ ansi_label.o dvd.o ebcdic.o lock.o \ autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o \ butil.o read_record.o reserve.o \ diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index 2aaaad2b58..95ecfc43e1 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -44,8 +44,8 @@ #include "bacula.h" #include "stored.h" -#ifdef USE_FAKETAPE -#include "faketape.h" +#ifdef USE_VTAPE +#include "vtape.h" #endif /* Dummy functions */ diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index b09c33dbcd..793a7a2740 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -127,12 +127,12 @@ init_dev(JCR *jcr, DEVRES *device) device->dev_type = B_TAPE_DEV; } else if (S_ISFIFO(statp.st_mode)) { device->dev_type = B_FIFO_DEV; -#ifdef USE_FAKETAPE +#ifdef USE_VTAPE /* must set DeviceType = Faketape * in normal mode, autodetection is disabled */ } else if (S_ISREG(statp.st_mode)) { - device->dev_type = B_FAKETAPE_DEV; + device->dev_type = B_VTAPE_DEV; #endif } else if (!(device->cap_bits & CAP_REQMOUNT)) { Jmsg2(jcr, M_ERROR, 0, _("%s is an unknown device type. Must be tape or directory\n" @@ -275,12 +275,12 @@ init_dev(JCR *jcr, DEVRES *device) /* Choose the right backend */ void DEVICE::init_backend() { - if (is_faketape()) { - d_open = faketape_open; - d_write = faketape_write; - d_close = faketape_close; - d_ioctl = faketape_ioctl; - d_read = faketape_read; + if (is_vtape()) { + d_open = vtape_open; + d_write = vtape_write; + d_close = vtape_close; + d_ioctl = vtape_ioctl; + d_read = vtape_read; #ifdef HAVE_WIN32 } else if (is_tape()) { @@ -1890,7 +1890,7 @@ void DEVICE::close() switch (dev_type) { case B_VTL_DEV: - case B_FAKETAPE_DEV: + case B_VTAPE_DEV: case B_TAPE_DEV: unlock_door(); default: @@ -1964,7 +1964,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_FAKETAPE_DEV: + case B_VTAPE_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 9d02218440..0bf6682ca0 100644 --- a/bacula/src/stored/dev.h +++ b/bacula/src/stored/dev.h @@ -95,7 +95,7 @@ enum { B_TAPE_DEV, B_DVD_DEV, B_FIFO_DEV, - B_FAKETAPE_DEV, /* change to B_TAPE_DEV after init */ + B_VTAPE_DEV, /* change to B_TAPE_DEV after init */ B_VTL_DEV }; @@ -309,12 +309,12 @@ public: int requires_mount() const { return capabilities & CAP_REQMOUNT; } int is_removable() const { return capabilities & CAP_REM; } int is_tape() const { return (dev_type == B_TAPE_DEV || - dev_type == B_FAKETAPE_DEV); } + dev_type == B_VTAPE_DEV); } 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_vtl() const { return dev_type == B_VTL_DEV; } - int is_faketape() const { return dev_type == B_FAKETAPE_DEV; } + int is_vtape() const { return dev_type == B_VTAPE_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.h b/bacula/src/stored/stored.h index 764b478f5f..edc2bb9944 100644 --- a/bacula/src/stored/stored.h +++ b/bacula/src/stored/stored.h @@ -78,7 +78,7 @@ const int sd_dbglvl = 300; int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); #endif -#include "faketape.h" +#include "vtape.h" /* Daemon globals from stored.c */ diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index d81fad95f9..15818e8bd5 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -213,7 +213,7 @@ static s_kw dev_types[] = { {"dvd", B_DVD_DEV}, {"fifo", B_FIFO_DEV}, {"vtl", B_VTL_DEV}, - {"faketape", B_FAKETAPE_DEV}, + {"vtape", B_VTAPE_DEV}, {NULL, 0} }; diff --git a/bacula/src/stored/faketape.c b/bacula/src/stored/vtape.c similarity index 100% rename from bacula/src/stored/faketape.c rename to bacula/src/stored/vtape.c diff --git a/bacula/src/stored/faketape.h b/bacula/src/stored/vtape.h similarity index 100% rename from bacula/src/stored/faketape.h rename to bacula/src/stored/vtape.h diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 11cd95b8d9..fb27fd1124 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -25,6 +25,7 @@ Add long term statistics job table General: 09Jun08 +ebl Rename faketape to vtape. ebl Update faketape driver. 08Jun08 ebl Modify faketape driver to avoid sparse file. -- 2.39.5