summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-20 00:46:53 +0000
committerJeremy Allison <jra@samba.org>2002-03-20 00:46:53 +0000
commitb9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329 (patch)
treebd74664377abf0b1d0745476d88f6668d06c5718 /source3/smbd/fileio.c
parent0cd5dd67ce12f02d3d20568e901ef7666caa8472 (diff)
downloadsamba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.tar.gz
samba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.tar.bz2
samba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.zip
Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename problems that people have had for a while. Needs a make clean :-) make. Also added JohnR's printing fix. Jeremy. (This used to be commit 504e5ef0494c54efbd0357e334cb2aa5a9eb9c14)
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 acbbb73352..addbcb0b3c 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -645,3 +645,15 @@ void sync_file(connection_struct *conn, files_struct *fsp)
conn->vfs_ops.fsync(fsp,fsp->fd);
}
}
+
+/************************************************************
+ Perform a stat whether a valid fd or not.
+************************************************************/
+
+int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst)
+{
+ if (fsp->fd == -1)
+ return vfs_stat(fsp->conn, fsp->fsp_name, pst);
+ else
+ return vfs_fstat(fsp,fsp->fd, pst);
+}