From 43e9be8894a2eaf883453de78acbade7b391a53e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 28 Mar 2012 12:37:04 +1100 Subject: build: Remove sys_lseek wrapper --- source3/lib/dbwrap/dbwrap_file.c | 4 ++-- source3/lib/recvfile.c | 2 +- source3/lib/smbrun.c | 2 +- source3/lib/system.c | 9 --------- source3/lib/util.c | 2 +- 5 files changed, 5 insertions(+), 14 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/dbwrap/dbwrap_file.c b/source3/lib/dbwrap/dbwrap_file.c index 8e513b5ad2..5b0da3a810 100644 --- a/source3/lib/dbwrap/dbwrap_file.c +++ b/source3/lib/dbwrap/dbwrap_file.c @@ -199,8 +199,8 @@ static struct db_record *db_file_fetch_locked(struct db_context *db, static NTSTATUS db_file_store_root(int fd, TDB_DATA data) { - if (sys_lseek(fd, 0, SEEK_SET) != 0) { - DEBUG(0, ("sys_lseek failed: %s\n", strerror(errno))); + if (lseek(fd, 0, SEEK_SET) != 0) { + DEBUG(0, ("lseek failed: %s\n", strerror(errno))); return map_nt_error_from_unix(errno); } diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c index c74cdd5a67..6c8a1a3b57 100644 --- a/source3/lib/recvfile.c +++ b/source3/lib/recvfile.c @@ -63,7 +63,7 @@ static ssize_t default_sys_recvfile(int fromfd, } if (tofd != -1 && offset != (SMB_OFF_T)-1) { - if (sys_lseek(tofd, offset, SEEK_SET) == -1) { + if (lseek(tofd, offset, SEEK_SET) == -1) { if (errno != ESPIPE) { return -1; } diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c index b38dee1665..0ecdc0d683 100644 --- a/source3/lib/smbrun.c +++ b/source3/lib/smbrun.c @@ -132,7 +132,7 @@ static int smbrun_internal(const char *cmd, int *outfd, bool sanitize) /* Reset the seek pointer. */ if (outfd) { - sys_lseek(*outfd, 0, SEEK_SET); + lseek(*outfd, 0, SEEK_SET); } #if defined(WIFEXITED) && defined(WEXITSTATUS) diff --git a/source3/lib/system.c b/source3/lib/system.c index 1e2c30db2f..08d13e6f2b 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -584,15 +584,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF #endif } -/******************************************************************* - An lseek() wrapper. -********************************************************************/ - -SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence) -{ - return lseek(fd, offset, whence); -} - /******************************************************************* An ftell() wrapper. ********************************************************************/ diff --git a/source3/lib/util.c b/source3/lib/util.c index d6e8ed8090..dcc02b5baf 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -347,7 +347,7 @@ ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos return (ssize_t)total; #else /* Use lseek and write_data. */ - if (sys_lseek(fd, pos, SEEK_SET) == -1) { + if (lseek(fd, pos, SEEK_SET) == -1) { if (errno != ESPIPE) { return -1; } -- cgit