-
Notifications
You must be signed in to change notification settings - Fork 781
Closed
Description
Taken from this https://github.com/torvalds/linux/blob/master/include/uapi/linux/posix_acl.h .
Input C/C++ Header
#define ACL_UNDEFINED_ID (-1)
/* a_type field in acl_user_posix_entry_t */
#define ACL_TYPE_ACCESS (0x8000)
#define ACL_TYPE_DEFAULT (0x4000)
/* e_tag entry in struct posix_acl_entry */
#define ACL_USER_OBJ (0x01)
#define ACL_USER (0x02)
#define ACL_GROUP_OBJ (0x04)
#define ACL_GROUP (0x08)
#define ACL_MASK (0x10)
#define ACL_OTHER (0x20)
/* permissions in the e_perm field */
#define ACL_READ (0x04)
#define ACL_WRITE (0x02)
#define ACL_EXECUTE (0x01)
Bindgen Invocation
$ bindgen input.h -o output.rs
Actual Results
pub const ACL_UNDEFINED_ID: i32 = -1;
pub const ACL_TYPE_ACCESS: u32 = 32768;
pub const ACL_TYPE_DEFAULT: u32 = 16384;
pub const ACL_USER_OBJ: u32 = 1;
pub const ACL_USER: u32 = 2;
pub const ACL_GROUP_OBJ: u32 = 4;
pub const ACL_GROUP: u32 = 8;
pub const ACL_MASK: u32 = 16;
pub const ACL_OTHER: u32 = 32;
pub const ACL_READ: u32 = 4;
pub const ACL_WRITE: u32 = 2;
pub const ACL_EXECUTE: u32 = 1;Expected Results
The correct parsing and generation of the u32 value, this is plaguing few rust libc functions.
Metadata
Metadata
Assignees
Labels
No labels