ReactOS  0.4.14-dev-583-g2a1ba2c
reiserfs_acl.h
Go to the documentation of this file.
1 #include <linux/init.h>
2 #include <linux/posix_acl.h>
3 #include <linux/xattr_acl.h>
4 
5 #define REISERFS_ACL_VERSION 0x0001
6 
7 typedef struct {
12 
13 typedef struct {
17 
18 typedef struct {
21 
22 static inline size_t reiserfs_acl_size(int count)
23 {
24  if (count <= 4) {
25  return sizeof(reiserfs_acl_header) +
27  } else {
28  return sizeof(reiserfs_acl_header) +
29  4 * sizeof(reiserfs_acl_entry_short) +
30  (count - 4) * sizeof(reiserfs_acl_entry);
31  }
32 }
33 
34 static inline int reiserfs_acl_count(size_t size)
35 {
36  ssize_t s;
37  size -= sizeof(reiserfs_acl_header);
38  s = size - 4 * sizeof(reiserfs_acl_entry_short);
39  if (s < 0) {
40  if (size % sizeof(reiserfs_acl_entry_short))
41  return -1;
42  return size / sizeof(reiserfs_acl_entry_short);
43  } else {
44  if (s % sizeof(reiserfs_acl_entry))
45  return -1;
46  return s / sizeof(reiserfs_acl_entry) + 4;
47  }
48 }
49 
50 
51 #ifdef CONFIG_REISERFS_FS_POSIX_ACL
52 struct posix_acl * reiserfs_get_acl(struct inode *inode, int type);
53 int reiserfs_acl_chmod (struct inode *inode);
54 int reiserfs_inherit_default_acl (struct inode *dir, struct dentry *dentry, struct inode *inode);
56 extern int reiserfs_xattr_posix_acl_init (void) __init;
57 extern int reiserfs_xattr_posix_acl_exit (void);
58 extern struct reiserfs_xattr_handler posix_acl_default_handler;
59 extern struct reiserfs_xattr_handler posix_acl_access_handler;
60 #else
61 
62 #define reiserfs_get_acl NULL
63 #define reiserfs_cache_default_acl(inode) 0
64 
65 static inline int
67 {
68  return 0;
69 }
70 
71 static inline int
73 {
74  return 0;
75 }
76 
77 static inline int
79 {
80  return 0;
81 }
82 
83 static inline int
84 reiserfs_inherit_default_acl (const struct inode *dir, struct dentry *dentry, struct inode *inode)
85 {
86  return 0;
87 }
88 
89 #endif
Definition: reiserfs_acl.h:13
static int reiserfs_xattr_posix_acl_exit(void)
Definition: reiserfs_acl.h:72
GLuint GLuint GLsizei count
Definition: gl.h:1545
__u32 e_id
Definition: reiserfs_acl.h:10
static int reiserfs_xattr_posix_acl_init(void)
Definition: reiserfs_acl.h:66
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static int reiserfs_inherit_default_acl(const struct inode *dir, struct dentry *dentry, struct inode *inode)
Definition: reiserfs_acl.h:84
static int reiserfs_acl_count(size_t size)
Definition: reiserfs_acl.h:34
#define reiserfs_get_acl
Definition: reiserfs_acl.h:62
Definition: fs.h:78
Definition: fs.h:117
unsigned int dir
Definition: maze.c:112
GLsizeiptr size
Definition: glext.h:5919
unsigned short __u16
Definition: compat.h:89
unsigned int __u32
Definition: compat.h:90
__u16 e_perm
Definition: reiserfs_acl.h:9
__u16 e_perm
Definition: reiserfs_acl.h:15
int ssize_t
Definition: rosdhcp.h:48
GLdouble s
Definition: gl.h:2039
#define __init
Definition: compat.h:3
__u16 e_tag
Definition: reiserfs_acl.h:14
Definition: reiserfs_acl.h:7
static size_t reiserfs_acl_size(int count)
Definition: reiserfs_acl.h:22
#define reiserfs_cache_default_acl(inode)
Definition: reiserfs_acl.h:63
__u16 e_tag
Definition: reiserfs_acl.h:8
static int reiserfs_acl_chmod(struct inode *inode)
Definition: reiserfs_acl.h:78