From 504b1f57e708fecae25dd7d559fb86da165c0f7a Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 12 Aug 2010 15:24:21 +0200 Subject: [PATCH] Make third argument of DEVICE::d_ioctl optionnal to emulate varg --- bacula/src/stored/dev.h | 2 +- bacula/src/stored/vtape.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bacula/src/stored/dev.h b/bacula/src/stored/dev.h index 55b5998346..38fb9ff9db 100644 --- a/bacula/src/stored/dev.h +++ b/bacula/src/stored/dev.h @@ -441,7 +441,7 @@ public: int fd() const { return m_fd; }; /* low level operations */ - virtual int d_ioctl(int fd, ioctl_req_t request, char *mt_com); + virtual int d_ioctl(int fd, ioctl_req_t request, char *mt_com=NULL); virtual int d_open(const char *pathname, int flags); virtual int d_close(int fd); virtual ssize_t d_read(int fd, void *buffer, size_t count); diff --git a/bacula/src/stored/vtape.h b/bacula/src/stored/vtape.h index 42b49c927b..057ecdaf9d 100644 --- a/bacula/src/stored/vtape.h +++ b/bacula/src/stored/vtape.h @@ -95,7 +95,7 @@ public: /* interface from DEVICE */ int d_close(int); int d_open(const char *pathname, int flags); - int d_ioctl(int fd, ioctl_req_t request, char *mt); + int d_ioctl(int fd, ioctl_req_t request, char *mt=NULL); ssize_t d_read(int, void *buffer, size_t count); ssize_t d_write(int, const void *buffer, size_t count); @@ -116,7 +116,7 @@ public: ssize_t d_read(void *buffer, size_t count) { return -1; } ssize_t d_write(const void *buffer, size_t count) { return -1; } int d_close(int) { return -1; } - int d_ioctl(int fd, ioctl_req_t request, char *mt) { return -1; } + int d_ioctl(int fd, ioctl_req_t request, char *mt=NULL) { return -1; } boffset_t lseek(DCR *dcr, off_t offset, int whence) { return -1; } }; -- 2.39.5