/* File: fs/ext2/acl.h (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org> */ #include <linux/posix_acl_xattr.h> #define EXT2_ACL_VERSION 0x0001 typedef struct { __le16 e_tag; __le16 e_perm; __le32 e_id; } ext2_acl_entry; typedef struct { __le16 e_tag; __le16 e_perm; } ext2_acl_entry_short; typedef struct { __le32 a_version; } ext2_acl_header; static inline size_t ext2_acl_size(int count) { if (count <= 4) { return sizeof(ext2_acl_header) + count * sizeof(ext2_acl_entry_short); } else { return sizeof(ext2_acl_header) + 4 * sizeof(ext2_acl_entry_short) + (count - 4) * sizeof(ext2_acl_entry); } } static inline int ext2_acl_count(size_t size) { ssize_t s; size -= sizeof(ext2_acl_header); s = size - 4 * sizeof(ext2_acl_entry_short); if (s < 0) { if (size % sizeof(ext2_acl_entry_short)) return -1; return size / sizeof(ext2_acl_entry_short); } else { if (s % sizeof(ext2_acl_entry)) return -1; return s / sizeof(ext2_acl_entry) + 4; } } #ifdef CONFIG_EXT2_FS_POSIX_ACL /* acl.c */ extern struct posix_acl *ext2_get_acl(struct inode *inode, int type); extern int ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type); extern int ext2_init_acl (struct inode *, struct inode *); #else #include <linux/sched.h> #define ext2_get_acl NULL #define ext2_set_acl NULL static inline int ext2_init_acl (struct inode *inode, struct inode *dir) { return 0; } #endif <td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc/include/arch-tests.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/perf/arch/powerpc/include/arch-tests.h?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/perf/arch/powerpc/include/arch-tests.h?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/perf/arch/powerpc/include/arch-tests.h?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc/include/arch-tests.h'> <input type='hidden' name='id' value='3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>perf</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>arch</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>powerpc</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc/include?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc/include/arch-tests.h?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94'>arch-tests.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/arch/powerpc/include/arch-tests.h?id=3484ecbe0e9deb94afb0b9b6172d77e98eb72b94&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>