summaryrefslogtreecommitdiff
path: root/source3/include/smb_macros.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-06 03:41:48 +0000
committerJeremy Allison <jra@samba.org>2000-10-06 03:41:48 +0000
commit14a8906e8ca491f3c7aa413daab1eaff29dad576 (patch)
tree5daae88c429df58cc9cac18dfddd42fe8184ce98 /source3/include/smb_macros.h
parent636f146abf0a75cd3b21a57b50627ee149a635ab (diff)
downloadsamba-14a8906e8ca491f3c7aa413daab1eaff29dad576.tar.gz
samba-14a8906e8ca491f3c7aa413daab1eaff29dad576.tar.bz2
samba-14a8906e8ca491f3c7aa413daab1eaff29dad576.zip
Inlined many of the vfs_XXX calls as macros for speed.
Jeremy. (This used to be commit 0811d080abd374f47c7c3c8a1ef007e443e5b79c)
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r--source3/include/smb_macros.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index fe0d15149b..a65b7048e9 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -215,5 +215,46 @@ copy an IP address from one buffer to another
#define dos_format(fname) string_replace(fname,'/','\\')
+/*******************************************************************
+ vfs stat wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_stat(conn, fname, st) ((conn)->vfs_ops.stat((conn), dos_to_unix((fname),False),(st)))
+
+/*******************************************************************
+ vfs fstat wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_fstat(fsp, fd, st) ((fsp)->conn->vfs_ops.fstat((fsp),(fd),(st)))
+
+/*******************************************************************
+ vfs rmdir wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_rmdir(conn,fname) ((conn)->vfs_ops.rmdir((conn),dos_to_unix((fname),False)))
+
+/*******************************************************************
+ vfs Unlink wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_unlink(conn, fname) ((conn)->vfs_ops.unlink((conn),dos_to_unix((fname),False)))
+
+/*******************************************************************
+ vfs chmod wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_chmod(conn,fname,mode) ((conn)->vfs_ops.chmod((conn),dos_to_unix((fname),False),(mode)))
+
+/*******************************************************************
+ vfs chown wrapper that calls dos_to_unix.
+********************************************************************/
+
+#define vfs_chown(conn,fname,uid,gid) ((conn)->vfs_ops.chown((conn),dos_to_unix((fname),False),(uid),(gid)))
+
+/*******************************************************************
+ A wrapper for vfs_chdir().
+********************************************************************/
+
+#define vfs_chdir(conn,fname) ((conn)->vfs_ops.chdir((conn),dos_to_unix((fname),False)))
#endif /* _SMB_MACROS_H */