Fix panic when transfer `how` to enum in sys_rt_sigprocmask()

This commit is contained in:
Marsman1996 2024-08-16 10:57:29 +08:00 committed by Tate, Hongliang Tian
parent 40c2acf29d
commit 5b5f9cffd1
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ pub fn sys_rt_sigprocmask(
sigset_size: usize,
ctx: &Context,
) -> Result<SyscallReturn> {
let mask_op = MaskOp::try_from(how).unwrap();
let mask_op = MaskOp::try_from(how)?;
debug!(
"mask op = {:?}, set_ptr = 0x{:x}, oldset_ptr = 0x{:x}, sigset_size = {}",
mask_op, set_ptr, oldset_ptr, sigset_size