From 9dc78c90f3c952f5c01686da6601c47565016290 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Jul 2012 21:33:57 +0200 Subject: s3-aio: Remove unused VFS functions and more Signed-off-by: Jeremy Allison --- source3/lib/system.c | 148 --------------------------------------------------- 1 file changed, 148 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/system.c b/source3/lib/system.c index fbfab3ec4f..270d0f52f4 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -35,10 +35,6 @@ #include #endif -#if defined(HAVE_AIO_H) -#include -#endif - /* The idea is that this file will eventually have wrappers around all important system calls in samba. The aims are: @@ -1383,147 +1379,3 @@ int sys_get_number_of_cores(void) return ret; } #endif - -#if defined(HAVE_AIO) - -/******************************************************************* - An aio_read wrapper. -********************************************************************/ - -int sys_aio_read(SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_READ) - return aio_read(aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_write wrapper. -********************************************************************/ - -int sys_aio_write(SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_WRITE) - return aio_write(aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_return wrapper. -********************************************************************/ - -ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_RETURN) - return aio_return(aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_cancel wrapper. -********************************************************************/ - -int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_CANCEL) - return aio_cancel(fd, aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_error wrapper. -********************************************************************/ - -int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_ERROR) - return aio_error(aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_fsync wrapper. -********************************************************************/ - -int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb) -{ -#if defined(HAVE_AIO_FSYNC) - return aio_fsync(op, aiocb); -#else - errno = ENOSYS; - return -1; -#endif -} - -/******************************************************************* - An aio_fsync wrapper. -********************************************************************/ - -int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout) -{ -#if defined(HAVE_AIO_FSYNC) - return aio_suspend(cblist, n, timeout); -#else - errno = ENOSYS; - return -1; -#endif -} -#else /* !HAVE_AIO */ - -int sys_aio_read(SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -int sys_aio_write(SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb) -{ - errno = ENOSYS; - return -1; -} - -int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout) -{ - errno = ENOSYS; - return -1; -} -#endif /* HAVE_AIO */ -- cgit