summary refs log tree commit diff
path: root/ripple
diff options
context:
space:
mode:
Diffstat (limited to 'ripple')
-rw-r--r--ripple/minitrace/src/main.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs
index 952aaf1..6d5dbc5 100644
--- a/ripple/minitrace/src/main.rs
+++ b/ripple/minitrace/src/main.rs
@@ -356,7 +356,7 @@ define_syscalls! {
 		fn arch_prctl(option: ArchOption, arg2: u64) -> i64 = 158;
 		fn set_tid_address(tidptr: *mut i32) -> i64 = 218;
 		fn exit_group(error_code: i32) -> i64 = 231;
-		fn openat(dfd: FileDesc, filename: CString, flags: OpenFlags, mode: u16) -> i64 = 257;
+		fn openat(dfd: FileDesc, filename: CString, flags: OpenFlags, mode: FileMode) -> i64 = 257;
 		fn newfstatat(dfd: FileDesc, filename: CString, statbuf: *mut Stat, flags: AtFlags) -> i64 = 262;
 		fn set_robust_list(head: *mut RobustListHead, len: usize) -> i64 = 273;
 		fn prlimit64(pid: i32, resource: ResourceLimit, new_rlim: *const RLimit64, old_rlim: *mut RLimit64) -> i64 = 302;
@@ -602,6 +602,20 @@ syscall_bitflags! {
 		const W = 1 << 1 => W_OK;
 		const R = 1 << 2 => R_OK;
 	}
+
+	struct FileMode: u32 {
+		const IRUSR = 0o400 => S_IRUSR;
+		const IWUSR = 0o200 => S_IWUSR;
+		const IXUSR = 0o100 => S_IXUSR;
+
+		const IRGRP = 0o040 => S_IRGRP;
+		const IWGRP = 0o020 => S_IWGRP;
+		const IXGRP = 0o010 => S_IXGRP;
+
+		const IROTH = 0o004 => S_IROTH;
+		const IWOTH = 0o002 => S_IWOTH;
+		const IXOTH = 0o001 => S_IXOTH;
+	}
 }
 
 syscall_enums! {