Switch to libredox where applicable (fixed)

This commit is contained in:
Jacob Lorentzon
2024-03-18 22:09:25 +00:00
committed by Jeremy Soller
parent 98078650f8
commit ff956fd3bb
83 changed files with 349 additions and 263 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ impl Cmd {
}
}
pub fn send_comand(file: &mut File, command: Cmd) -> Result<(), syscall::Error> {
pub fn send_comand(file: &mut File, command: Cmd) -> Result<(), libredox::error::Error> {
use std::os::fd::AsRawFd;
let mut result = vec![];
@@ -119,7 +119,7 @@ pub fn send_comand(file: &mut File, command: Cmd) -> Result<(), syscall::Error>
}
};
let written = syscall::write(file.as_raw_fd() as usize, &result)?;
let written = libredox::call::write(file.as_raw_fd() as usize, &result)?;
// XXX: Ensure all of the data is written.
assert_eq!(written, result.len());
+1 -1
View File
@@ -535,7 +535,7 @@ pub fn main() {
.expect("inputd: failed to open consumer handle");
let mut display_path = [0; 4096];
let written = syscall::fpath(handle.as_raw_fd() as usize, &mut display_path)
let written = libredox::call::fpath(handle.as_raw_fd() as usize, &mut display_path)
.expect("inputd: fpath() failed");
assert!(written <= display_path.len());