diff options
author | Jeremy Allison <jra@samba.org> | 2000-04-04 18:44:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-04-04 18:44:04 +0000 |
commit | 2d15c34f4fc2f3943328976361ab8c67508b6e82 (patch) | |
tree | ff62ca133178e07bfa48b9acad204bea620cd216 /source3/smbd | |
parent | 9d5ddab76661878e08d9f3b4c6c34f52119318c3 (diff) | |
download | samba-2d15c34f4fc2f3943328976361ab8c67508b6e82.tar.gz samba-2d15c34f4fc2f3943328976361ab8c67508b6e82.tar.bz2 samba-2d15c34f4fc2f3943328976361ab8c67508b6e82.zip |
Change to vfs API. POSIX states fsync should return an int, not a void.
Jeremy.
(This used to be commit 6c442d68afae4140e28b770343a900b5ce510b4a)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/fileio.c | 2 | ||||
-rw-r--r-- | source3/smbd/vfs-wrap.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 348486d430..00a515d16d 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -651,10 +651,8 @@ sync a file void sys_fsync_file(connection_struct *conn, files_struct *fsp) { -#ifdef HAVE_FSYNC if(lp_strict_sync(SNUM(conn)) && fsp->fd_ptr != NULL) { flush_write_cache(fsp, SYNC_FLUSH); conn->vfs_ops.fsync(fsp->fd_ptr->fd); } -#endif } diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c index 24e45a6d24..b9c22ef1f9 100644 --- a/source3/smbd/vfs-wrap.c +++ b/source3/smbd/vfs-wrap.c @@ -204,9 +204,13 @@ int vfswrap_rename(char *old, char *new) return result; } -void vfswrap_fsync(int fd) +int vfswrap_fsync(int fd) { - fsync(fd); +#ifdef HAVE_FSYNC + return fsync(fd); +#else + return 0; +#endif } int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf) |