Switch to libredox where applicable (fixed)
This commit is contained in:
committed by
Jeremy Soller
parent
98078650f8
commit
ff956fd3bb
+2
-2
@@ -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
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user