]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/vfs.h
Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop
[netatalk.git] / include / atalk / vfs.h
index 0797e04511e65ab08520e039523fb0ef76f15f47..6021c150987db56b02c701a5bac934ef54c90aa4 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <atalk/adouble.h>
 #include <atalk/volume.h>
+#include <atalk/acl.h>
 
 #define VFS_FUNC_ARGS_VALIDUPATH const struct vol *vol, const char *name
 #define VFS_FUNC_VARS_VALIDUPATH vol, name
@@ -34,8 +35,8 @@
 #define VFS_FUNC_ARGS_CHOWN const struct vol *vol, const char *path, uid_t uid, gid_t gid
 #define VFS_FUNC_VARS_CHOWN vol, path, uid, gid
 
-#define VFS_FUNC_ARGS_RENAMEDIR const struct vol *vol, const char *oldpath, const char *newpath
-#define VFS_FUNC_VARS_RENAMEDIR vol, oldpath, newpath
+#define VFS_FUNC_ARGS_RENAMEDIR const struct vol *vol, int dirfd, const char *oldpath, const char *newpath
+#define VFS_FUNC_VARS_RENAMEDIR vol, dirfd, oldpath, newpath
 
 #define VFS_FUNC_ARGS_DELETECURDIR const struct vol *vol
 #define VFS_FUNC_VARS_DELETECURDIR vol
 #define VFS_FUNC_ARGS_SETDIROWNER const struct vol *vol, const char *name, uid_t uid, gid_t gid
 #define VFS_FUNC_VARS_SETDIROWNER vol, name, uid, gid
 
-#define VFS_FUNC_ARGS_DELETEFILE const struct vol *vol, const char *file
-#define VFS_FUNC_VARS_DELETEFILE vol, file
+#define VFS_FUNC_ARGS_DELETEFILE const struct vol *vol, int dirfd, const char *file
+#define VFS_FUNC_VARS_DELETEFILE vol, dirfd, file
 
-#define VFS_FUNC_ARGS_RENAMEFILE const struct vol *vol, const char *src, const char *dst
-#define VFS_FUNC_VARS_RENAMEFILE vol, src, dst
+#define VFS_FUNC_ARGS_RENAMEFILE const struct vol *vol, int dirfd, const char *src, const char *dst
+#define VFS_FUNC_VARS_RENAMEFILE vol, dirfd, src, dst
 
-#define VFS_FUNC_ARGS_COPYFILE const struct vol *vol, const char *src, const char *dst
-#define VFS_FUNC_VARS_COPYFILE vol, src, dst
+#define VFS_FUNC_ARGS_COPYFILE const struct vol *vol, int sfd, const char *src, const char *dst
+#define VFS_FUNC_VARS_COPYFILE vol, sfd, src, dst
 
+#ifdef HAVE_NFSV4_ACLS
 #define VFS_FUNC_ARGS_ACL const struct vol *vol, const char *path, int cmd, int count, void *aces
 #define VFS_FUNC_VARS_ACL vol, path, cmd, count, aces
+#endif
+#ifdef HAVE_POSIX_ACLS
+#define VFS_FUNC_ARGS_ACL const struct vol *vol, const char *path, acl_type_t type, int count, acl_t acl
+#define VFS_FUNC_VARS_ACL vol, path, type, count, acl
+#endif
 
 #define VFS_FUNC_ARGS_REMOVE_ACL const struct vol *vol, const char *path, int dir
 #define VFS_FUNC_VARS_REMOVE_ACL vol, path, dir
 #define VFS_FUNC_ARGS_EA_REMOVE const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, int oflag
 #define VFS_FUNC_VARS_EA_REMOVE vol, uname, attruname, oflag
 
-struct vfs_ops {
-    /* low level adouble fn */
-    char *(*ad_path)        (const char *, int); /* name is ad_path because it was too
-                                                    much work to change all calls to
-                                                    sth. different eg vfs_path */
+/*
+ * Forward declaration. We need it because of the circular inclusion of
+ * of vfs.h <-> volume.h. 
+ */
+struct vol;
 
-    /* */
+struct vfs_ops {
     int (*vfs_validupath)    (VFS_FUNC_ARGS_VALIDUPATH);
     int (*vfs_chown)         (VFS_FUNC_ARGS_CHOWN);
     int (*vfs_renamedir)     (VFS_FUNC_ARGS_RENAMEDIR);
@@ -101,9 +108,11 @@ struct vfs_ops {
     int (*vfs_renamefile)    (VFS_FUNC_ARGS_RENAMEFILE);
     int (*vfs_copyfile)      (VFS_FUNC_ARGS_COPYFILE);
 
+#ifdef HAVE_ACLS
     /* ACLs */
     int (*vfs_acl)           (VFS_FUNC_ARGS_ACL);
     int (*vfs_remove_acl)    (VFS_FUNC_ARGS_REMOVE_ACL);
+#endif
 
     /* Extended Attributes */
     int (*vfs_ea_getsize)    (VFS_FUNC_ARGS_EA_GETSIZE);