diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-17 07:40:06 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-17 07:40:06 +0000 |
commit | 0922615405838af7430ef39490ee578711866320 (patch) | |
tree | f04bd1071fa108bca40c2a6e8b0d39ac761e3500 /source3/smbd/fileio.c | |
parent | 4c5c26b1ef4be862fc2037dd5fcc120cb35bacca (diff) | |
download | samba-0922615405838af7430ef39490ee578711866320.tar.gz samba-0922615405838af7430ef39490ee578711866320.tar.xz samba-0922615405838af7430ef39490ee578711866320.zip |
more splitting of server.c
created dosmode.c and filename.c
(This used to be commit 534a90ca44641417c21f6ed6d4b94b1de60f808d)
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r-- | source3/smbd/fileio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index edf87f3e7b5..971d309ff98 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -115,3 +115,15 @@ int write_file(files_struct *fsp,char *data,int n) return(write_data(fsp->fd_ptr->fd,data,n)); } + +/******************************************************************* +sync a file +********************************************************************/ +void sync_file(connection_struct *conn, files_struct *fsp) +{ +#ifdef HAVE_FSYNC + if(lp_strict_sync(SNUM(conn))) + fsync(fsp->fd_ptr->fd); +#endif +} + |