Correct name of each shim when erroring

This commit is contained in:
Christian Poveda
2019-10-01 10:57:12 -05:00
parent cd495cb04f
commit 5a05c04c85
+5 -5
View File
@@ -92,7 +92,7 @@ fn fcntl(
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 @@ fn close(&mut self, fd_op: OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> {
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 @@ fn read(
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 @@ fn write(
/// 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<i32>` instead of `i32` directly because some IO related
@@ -227,7 +227,7 @@ fn get_handle_and<F, T: From<i32>>(&mut self, fd: i32, f: F) -> InterpResult<'tc
/// 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<i32>` instead of `i32` directly because some IO related