diff options
author | edef <edef@unfathomable.blue> | 2022-07-30 19:52:37 +0000 |
---|---|---|
committer | edef <edef@unfathomable.blue> | 2022-07-30 19:52:37 +0000 |
commit | bf43a09f7e1c9ce415aee9733741a0cc5b887ea6 (patch) | |
tree | ec4f3f14b7bc6b7980ee5ac3f461dab5c58de8e3 /ripple/minitrace/src/syscall_abi | |
parent | e68fb769a96f0896c92e8c1884a727d3ead47844 (diff) | |
download | unf-legacy-bf43a09f7e1c9ce415aee9733741a0cc5b887ea6.tar.zst |
ripple/minitrace/syscall_abi: represent RobustListHeadSize with a unit struct
Change-Id: I709870b36d5b2329be53389af6c816aaeadfdd7b
Diffstat (limited to 'ripple/minitrace/src/syscall_abi')
-rw-r--r-- | ripple/minitrace/src/syscall_abi/mod.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ripple/minitrace/src/syscall_abi/mod.rs b/ripple/minitrace/src/syscall_abi/mod.rs index 6a84679..c274d0b 100644 --- a/ripple/minitrace/src/syscall_abi/mod.rs +++ b/ripple/minitrace/src/syscall_abi/mod.rs @@ -42,7 +42,7 @@ define_syscalls! { fn exit_group(error_code: i32) -> i64 = 231; fn openat(dfd: DirFd, filename: CString, flags: OpenFlags, mode: FileMode) -> i64 = 257; fn newfstatat(dfd: DirFd, filename: CString, statbuf: *mut Stat, flags: AtFlags) -> i64 = 262; - fn set_robust_list(head: *mut RobustListHead, len: usize) -> i64 = 273; + fn set_robust_list(head: *mut RobustListHead, len: RobustListHeadSize) -> i64 = 273; fn prlimit64(pid: i32, resource: ResourceLimit, new_rlim: *const RLimit64, old_rlim: *mut RLimit64) -> i64 = 302; fn getrandom(ubuf: *mut u8, len: usize, flags: GrndFlags) -> i64 = 318; } @@ -138,3 +138,16 @@ impl SyscallArg for SigSetSize { } } } + +#[derive(Debug, Copy, Clone)] +pub(crate) struct RobustListHeadSize; + +impl SyscallArg for RobustListHeadSize { + fn try_from_reg(reg: u64) -> Option<Self> { + if reg == 24 { + Some(RobustListHeadSize) + } else { + None + } + } +} |