Skip to content

Commit 5a05c04

Browse files
committed
Correct name of each shim when erroring
1 parent cd495cb commit 5a05c04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/shims/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
9292
let this = self.eval_context_mut();
9393

9494
if !this.machine.communicate {
95-
throw_unsup_format!("`open` not available when isolation is enabled")
95+
throw_unsup_format!("`fcntl` not available when isolation is enabled")
9696
}
9797

9898
let fd = this.read_scalar(fd_op)?.to_i32()?;
@@ -125,7 +125,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
125125
let this = self.eval_context_mut();
126126

127127
if !this.machine.communicate {
128-
throw_unsup_format!("`open` not available when isolation is enabled")
128+
throw_unsup_format!("`close` not available when isolation is enabled")
129129
}
130130

131131
let fd = this.read_scalar(fd_op)?.to_i32()?;
@@ -145,7 +145,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
145145
let this = self.eval_context_mut();
146146

147147
if !this.machine.communicate {
148-
throw_unsup_format!("`open` not available when isolation is enabled")
148+
throw_unsup_format!("`read` not available when isolation is enabled")
149149
}
150150

151151
let tcx = &{ this.tcx.tcx };
@@ -204,7 +204,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
204204
/// Helper function that gets a `FileHandle` immutable reference and allows to manipulate it
205205
/// using the `f` closure.
206206
///
207-
/// If the `fd` file descriptor does not corresponds to a file, this functions returns `Ok(-1)`
207+
/// If the `fd` file descriptor does not correspond to a file, this functions returns `Ok(-1)`
208208
/// and sets `Evaluator::last_error` to `libc::EBADF` (invalid file descriptor).
209209
///
210210
/// This function uses `T: From<i32>` instead of `i32` directly because some IO related
@@ -227,7 +227,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
227227
/// to modify `MiriEvalContext` at the same time, so you can modify the handle and reinsert it
228228
/// using `f`.
229229
///
230-
/// If the `fd` file descriptor does not corresponds to a file, this functions returns `Ok(-1)`
230+
/// If the `fd` file descriptor does not correspond to a file, this functions returns `Ok(-1)`
231231
/// and sets `Evaluator::last_error` to `libc::EBADF` (invalid file descriptor).
232232
///
233233
/// This function uses `T: From<i32>` instead of `i32` directly because some IO related

0 commit comments

Comments
 (0)