git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c89d12
)
build: Remove sys_lseek wrapper
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 28 Mar 2012 01:37:04 +0000
(12:37 +1100)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 5 Apr 2012 00:39:08 +0000
(
02:39
+0200)
source3/client/client.c
patch
|
blob
|
history
source3/include/proto.h
patch
|
blob
|
history
source3/lib/dbwrap/dbwrap_file.c
patch
|
blob
|
history
source3/lib/recvfile.c
patch
|
blob
|
history
source3/lib/smbrun.c
patch
|
blob
|
history
source3/lib/system.c
patch
|
blob
|
history
source3/lib/util.c
patch
|
blob
|
history
source3/modules/vfs_default.c
patch
|
blob
|
history
source3/passdb/pdb_smbpasswd.c
patch
|
blob
|
history
diff --git
a/source3/client/client.c
b/source3/client/client.c
index 0d60103f26f9037ee7154e9506c5b5aaa8376314..f10e56348c7396c25c20b1a213edecd31fb8e57e 100644
(file)
--- a/
source3/client/client.c
+++ b/
source3/client/client.c
@@
-1110,7
+1110,7
@@
static int do_get(const char *rname, const char *lname_in, bool reget)
if (reget) {
handle = sys_open(lname, O_WRONLY|O_CREAT, 0644);
if (handle >= 0) {
if (reget) {
handle = sys_open(lname, O_WRONLY|O_CREAT, 0644);
if (handle >= 0) {
- start =
sys_
lseek(handle, 0, SEEK_END);
+ start = lseek(handle, 0, SEEK_END);
if (start == -1) {
d_printf("Error seeking local file\n");
return 1;
if (start == -1) {
d_printf("Error seeking local file\n");
return 1;
diff --git
a/source3/include/proto.h
b/source3/include/proto.h
index 430cfeb8cf27b63f038e73a86859d8c50f8e80f2..b3ab9714e662fab4790a572427faf56d3e35d7e9 100644
(file)
--- a/
source3/include/proto.h
+++ b/
source3/include/proto.h
@@
-336,7
+336,6
@@
int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
bool fake_dir_create_times);
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
bool fake_dir_create_times);
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
-SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
SMB_OFF_T sys_ftell(FILE *fp);
int sys_creat(const char *path, mode_t mode);
int sys_open(const char *path, int oflag, mode_t mode);
SMB_OFF_T sys_ftell(FILE *fp);
int sys_creat(const char *path, mode_t mode);
int sys_open(const char *path, int oflag, mode_t mode);
diff --git
a/source3/lib/dbwrap/dbwrap_file.c
b/source3/lib/dbwrap/dbwrap_file.c
index 8e513b5ad2bc193172eb23a6e19784d7b603c87c..5b0da3a810873cc979417a4828d47383452e94d6 100644
(file)
--- 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)
{
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);
}
return map_nt_error_from_unix(errno);
}
diff --git
a/source3/lib/recvfile.c
b/source3/lib/recvfile.c
index c74cdd5a67d94a0a028db86ea6df53aa12ca1cbb..6c8a1a3b5779e14b261920a09977240372588e7a 100644
(file)
--- 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 (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;
}
if (errno != ESPIPE) {
return -1;
}
diff --git
a/source3/lib/smbrun.c
b/source3/lib/smbrun.c
index b38dee1665bcd4379e84f1eb9f5bdf4bad760321..0ecdc0d68379d6cdd6dda9448eb664d6aa31a6e0 100644
(file)
--- 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) {
/* Reset the seek pointer. */
if (outfd) {
-
sys_
lseek(*outfd, 0, SEEK_SET);
+ lseek(*outfd, 0, SEEK_SET);
}
#if defined(WIFEXITED) && defined(WEXITSTATUS)
}
#if defined(WIFEXITED) && defined(WEXITSTATUS)
diff --git
a/source3/lib/system.c
b/source3/lib/system.c
index 1e2c30db2f1abe164d0dcd7d4d83c4caf1d13c05..08d13e6f2bff0682d5b296151c80c831b77d6934 100644
(file)
--- 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
}
#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.
********************************************************************/
/*******************************************************************
An ftell() wrapper.
********************************************************************/
diff --git
a/source3/lib/util.c
b/source3/lib/util.c
index d6e8ed8090c45ea5e60ac4c0011b113b9e3269b2..dcc02b5bafa97b9c7bc7c1288da3d49342520e21 100644
(file)
--- 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. */
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;
}
if (errno != ESPIPE) {
return -1;
}
diff --git
a/source3/modules/vfs_default.c
b/source3/modules/vfs_default.c
index f5a64759be4c131ed5399930fccb14bdc2a5ff60..35073143c06a8ab522d3435e51f742613a25a91d 100644
(file)
--- a/
source3/modules/vfs_default.c
+++ b/
source3/modules/vfs_default.c
@@
-634,7
+634,7
@@
static SMB_OFF_T vfswrap_lseek(vfs_handle_struct *handle, files_struct *fsp, SMB
/* Cope with 'stat' file opens. */
if (fsp->fh->fd != -1)
/* Cope with 'stat' file opens. */
if (fsp->fh->fd != -1)
- result =
sys_
lseek(fsp->fh->fd, offset, whence);
+ result = lseek(fsp->fh->fd, offset, whence);
/*
* We want to maintain the fiction that we can seek
/*
* We want to maintain the fiction that we can seek
diff --git
a/source3/passdb/pdb_smbpasswd.c
b/source3/passdb/pdb_smbpasswd.c
index 789374a75fe06f7de04db3172eb1d1ed2448e837..4c7ff57f6cc05d0f1e0b38dee35ee6d914e5036e 100644
(file)
--- a/
source3/passdb/pdb_smbpasswd.c
+++ b/
source3/passdb/pdb_smbpasswd.c
@@
-678,9
+678,9
@@
static NTSTATUS add_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state,
*/
fd = fileno(fp);
*/
fd = fileno(fp);
- if((offpos =
sys_
lseek(fd, 0, SEEK_END)) == -1) {
+ if((offpos = lseek(fd, 0, SEEK_END)) == -1) {
NTSTATUS result = map_nt_error_from_unix(errno);
NTSTATUS result = map_nt_error_from_unix(errno);
- DEBUG(0, ("add_smbfilepwd_entry(
sys_
lseek): Failed to add entry for user %s to file %s. \
+ DEBUG(0, ("add_smbfilepwd_entry(lseek): Failed to add entry for user %s to file %s. \
Error was %s\n", newpwd->smb_name, pfile, strerror(errno)));
endsmbfilepwent(fp, &smbpasswd_state->pw_file_lock_depth);
return result;
Error was %s\n", newpwd->smb_name, pfile, strerror(errno)));
endsmbfilepwent(fp, &smbpasswd_state->pw_file_lock_depth);
return result;
@@
-1039,7
+1039,7
@@
This is no longer supported.!\n", pwd->smb_name));
fd = fileno(fp);
fd = fileno(fp);
- if (
sys_
lseek(fd, pwd_seekpos - 1, SEEK_SET) != pwd_seekpos - 1) {
+ if (lseek(fd, pwd_seekpos - 1, SEEK_SET) != pwd_seekpos - 1) {
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);
@@
-1061,7
+1061,7
@@
This is no longer supported.!\n", pwd->smb_name));
return False;
}
return False;
}
- if (
sys_
lseek(fd, pwd_seekpos, SEEK_SET) != pwd_seekpos) {
+ if (lseek(fd, pwd_seekpos, SEEK_SET) != pwd_seekpos) {
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);
DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);