From 1186c8752d9e3111fdc74266d967c7dead92a0ed Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 17 Jun 2008 20:48:00 +0000 Subject: [PATCH] ebl Disable vtape for freebsd git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7159 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/dev.c | 3 +-- bacula/src/stored/vtape.c | 15 +++++++++++++++ bacula/technotes-2.5 | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index ed6fdfefb7..ebfefc00a9 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -293,9 +293,8 @@ void DEVICE::init_backend() } #else /* POSIX / UNIX Interface */ - if (is_vtape()) { /* test backend */ - d_open = vtape_open; /* vtape isn't available for WIN32 */ + d_open = vtape_open; /* vtape isn't available for WIN32 or FreeBSD */ d_write = vtape_write; d_close = vtape_close; d_ioctl = vtape_ioctl; diff --git a/bacula/src/stored/vtape.c b/bacula/src/stored/vtape.c index e5c0b763f0..35b7af4a90 100644 --- a/bacula/src/stored/vtape.c +++ b/bacula/src/stored/vtape.c @@ -166,6 +166,19 @@ int vtape_ioctl(int fd, unsigned long int request, ...) /****************************************************************/ +#ifdef HAVE_FREEBSD_OS +int vtape::tape_op(struct mtop *mt_com) +{ + return -1; +} + +int vtape::tape_get(struct mtget *mt_get) +{ + return -1; +} + +#else /* Posix */ + int vtape::tape_op(struct mtop *mt_com) { int result=0; @@ -391,6 +404,8 @@ int vtape::tape_get(struct mtget *mt_get) return 0; } +#endif /* ! HAVE_FREEBSD_OS */ + int vtape::tape_pos(struct mtpos *mt_pos) { if (current_block >= 0) { diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index b4a0adb404..81e624a049 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -25,6 +25,8 @@ vtape driver General: +17Jun08 +ebl Disable vtape for FreeBSD. 15Jun08 ebl Modify disk-changer to check if slot contains something before loading it. -- 2.39.5