summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-17 07:40:06 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-17 07:40:06 +0000
commit0922615405838af7430ef39490ee578711866320 (patch)
treef04bd1071fa108bca40c2a6e8b0d39ac761e3500 /source3/smbd/fileio.c
parent4c5c26b1ef4be862fc2037dd5fcc120cb35bacca (diff)
downloadsamba-0922615405838af7430ef39490ee578711866320.tar.gz
samba-0922615405838af7430ef39490ee578711866320.tar.bz2
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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index edf87f3e7b..971d309ff9 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
+}
+