From 0922615405838af7430ef39490ee578711866320 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 1998 07:40:06 +0000 Subject: more splitting of server.c created dosmode.c and filename.c (This used to be commit 534a90ca44641417c21f6ed6d4b94b1de60f808d) --- source3/smbd/fileio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/smbd/fileio.c') 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 +} + -- cgit