From 5a05c04c857538a60cd006455686124162f736dc Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Tue, 1 Oct 2019 10:57:12 -0500 Subject: [PATCH] Correct name of each shim when erroring --- src/shims/io.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shims/io.rs b/src/shims/io.rs index afb6e6311e72..9f08141eb3b0 100644 --- a/src/shims/io.rs +++ b/src/shims/io.rs @@ -92,7 +92,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let this = self.eval_context_mut(); if !this.machine.communicate { - throw_unsup_format!("`open` not available when isolation is enabled") + throw_unsup_format!("`fcntl` not available when isolation is enabled") } let fd = this.read_scalar(fd_op)?.to_i32()?; @@ -125,7 +125,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let this = self.eval_context_mut(); if !this.machine.communicate { - throw_unsup_format!("`open` not available when isolation is enabled") + throw_unsup_format!("`close` not available when isolation is enabled") } let fd = this.read_scalar(fd_op)?.to_i32()?; @@ -145,7 +145,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let this = self.eval_context_mut(); if !this.machine.communicate { - throw_unsup_format!("`open` not available when isolation is enabled") + throw_unsup_format!("`read` not available when isolation is enabled") } let tcx = &{ this.tcx.tcx }; @@ -204,7 +204,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx /// Helper function that gets a `FileHandle` immutable reference and allows to manipulate it /// using the `f` closure. /// - /// If the `fd` file descriptor does not corresponds to a file, this functions returns `Ok(-1)` + /// If the `fd` file descriptor does not correspond to a file, this functions returns `Ok(-1)` /// and sets `Evaluator::last_error` to `libc::EBADF` (invalid file descriptor). /// /// This function uses `T: From` instead of `i32` directly because some IO related @@ -227,7 +227,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx /// to modify `MiriEvalContext` at the same time, so you can modify the handle and reinsert it /// using `f`. /// - /// If the `fd` file descriptor does not corresponds to a file, this functions returns `Ok(-1)` + /// If the `fd` file descriptor does not correspond to a file, this functions returns `Ok(-1)` /// and sets `Evaluator::last_error` to `libc::EBADF` (invalid file descriptor). /// /// This function uses `T: From` instead of `i32` directly because some IO related