diff options
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 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); +} |