Skip to content

Commit 877492b

Browse files
committed
Switch from using EINVAL to throw_unsup_format
1 parent 2c61f77 commit 877492b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/shims/unix/linux/eventfd.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
176176
is_nonblock = true;
177177
}
178178
if flags != 0 {
179-
let einval = this.eval_libc("EINVAL");
180-
this.set_last_error(einval)?;
181-
return Ok(Scalar::from_i32(-1));
179+
throw_unsup_format!("eventfd: Flags other than EFD_CLOEXEC, EFD_NONBLOCK \
180+
and EFD_SEMAPHORE is not supported.");
182181
}
183182

184183
let fd = this.machine.fds.insert_fd(FileDescriptor::new(Event {

0 commit comments

Comments
 (0)