acl_ea.h

来自「unxi下共享内存的使用」· C头文件 代码 · 共 45 行

H
45
字号
/*  File: linux/acl_ea.h  (extended attribute representation of access control lists)  (C) 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org>*/#ifndef _LINUX_ACL_EA_H#define _LINUX_ACL_EA_H#include <linux/posix_acl.h>#define ACL_EA_ACCESS		"system.posix_acl_access"#define ACL_EA_DEFAULT		"system.posix_acl_default"#define ACL_EA_VERSION		0x0002typedef struct {	__u16		e_tag;	__u16		e_perm;	__u32		e_id;} acl_ea_entry;typedef struct {	__u32		a_version;	acl_ea_entry	a_entries[0];} acl_ea_header;static inline size_t acl_ea_size(int count){	return sizeof(acl_ea_header) + count * sizeof(acl_ea_entry);}static inline int acl_ea_count(size_t size){	if (size < sizeof(acl_ea_header))		return -1;	size -= sizeof(acl_ea_header);	if (size % sizeof(acl_ea_entry))		return -1;	return size / sizeof(acl_ea_entry);}#endif	/* _LINUX_ACL_EA_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?