Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hypercall): ReadPrams -> ReadParams #765

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hypercall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub unsafe fn address_to_hypercall(
Hypercall::FileOpen(sysopen)
}
HypercallAddress::FileRead => {
let sysread = mem.get_ref_mut::<ReadPrams>(data).unwrap();
let sysread = mem.get_ref_mut::<ReadParams>(data).unwrap();
Hypercall::FileRead(sysread)
}
HypercallAddress::FileWrite => {
Expand Down Expand Up @@ -102,7 +102,7 @@ pub fn close(sysclose: &mut CloseParams) {
}

/// Handles an read syscall on the host.
pub fn read(mem: &MmapMemory, sysread: &mut ReadPrams) {
pub fn read(mem: &MmapMemory, sysread: &mut ReadParams) {
unsafe {
let bytes_read = libc::read(
sysread.fd,
Expand Down
2 changes: 1 addition & 1 deletion uhyve-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub enum Hypercall<'a> {
FileClose(&'a mut CloseParams),
FileLseek(&'a mut LseekParams),
FileOpen(&'a mut OpenParams),
FileRead(&'a mut ReadPrams),
FileRead(&'a mut ReadParams),
FileWrite(&'a WriteParams),
FileUnlink(&'a mut UnlinkParams),
/// Write a char to the terminal.
Expand Down
2 changes: 1 addition & 1 deletion uhyve-interface/src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub struct WriteParams {
/// Parameters for a [`FileRead`](crate::Hypercall::FileRead) hypercall.
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ReadPrams {
pub struct ReadParams {
/// File descriptor of the file.
pub fd: i32,
/// Buffer to read the file into.
Expand Down