Switch to libredox where applicable.

This commit is contained in:
4lDO2
2024-03-18 19:23:05 +01:00
parent 65f706530a
commit 2e7dbf1cc1
79 changed files with 323 additions and 238 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());