@@ -256,14 +256,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
256
256
let epollhup = this. eval_libc_u32 ( "EPOLLHUP" ) ;
257
257
let epollerr = this. eval_libc_u32 ( "EPOLLERR" ) ;
258
258
259
- // Fail on unsupported operations.
260
- if op & epoll_ctl_add != epoll_ctl_add
261
- && op & epoll_ctl_mod != epoll_ctl_mod
262
- && op & epoll_ctl_del != epoll_ctl_del
263
- {
264
- throw_unsup_format ! ( "epoll_ctl: encountered unknown unsupported operation {:#x}" , op) ;
265
- }
266
-
267
259
// Throw EINVAL if epfd and fd have the same value.
268
260
if epfd_value == fd {
269
261
this. set_last_error ( LibcError ( "EINVAL" ) ) ?;
@@ -368,7 +360,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
368
360
// Notification will be returned for current epfd if there is event in the file
369
361
// descriptor we registered.
370
362
check_and_update_one_event_interest ( & fd_ref, interest, id, this) ?;
371
- return interp_ok ( Scalar :: from_i32 ( 0 ) ) ;
363
+ interp_ok ( Scalar :: from_i32 ( 0 ) )
372
364
} else if op == epoll_ctl_del {
373
365
let epoll_key = ( id, fd) ;
374
366
@@ -394,9 +386,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
394
386
. unwrap ( )
395
387
. retain ( |event| event. upgrade ( ) . is_some ( ) ) ;
396
388
397
- return interp_ok ( Scalar :: from_i32 ( 0 ) ) ;
389
+ interp_ok ( Scalar :: from_i32 ( 0 ) )
390
+ } else {
391
+ throw_unsup_format ! ( "unsupported epoll_ctl operation: {op}" ) ;
398
392
}
399
- interp_ok ( Scalar :: from_i32 ( -1 ) )
400
393
}
401
394
402
395
/// The `epoll_wait()` system call waits for events on the `Epoll`
0 commit comments