summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-28 12:37:04 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:08 +0200
commit43e9be8894a2eaf883453de78acbade7b391a53e (patch)
tree86c52757bd1824edfa0418969963cc30076379e3 /source3/lib
parent5c89d12ca43e7949ace93c75ce59ca9fc0606521 (diff)
downloadsamba-43e9be8894a2eaf883453de78acbade7b391a53e.tar.gz
samba-43e9be8894a2eaf883453de78acbade7b391a53e.tar.bz2
samba-43e9be8894a2eaf883453de78acbade7b391a53e.zip
build: Remove sys_lseek wrapper
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap_file.c4
-rw-r--r--source3/lib/recvfile.c2
-rw-r--r--source3/lib/smbrun.c2
-rw-r--r--source3/lib/system.c9
-rw-r--r--source3/lib/util.c2
5 files changed, 5 insertions, 14 deletions
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
@@ -585,15 +585,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF
}
/*******************************************************************
- 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;
}