diff --git a/Cargo.lock b/Cargo.lock index e16e011..4cd70ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,12 @@ checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "byteorder" @@ -101,6 +104,7 @@ checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" name = "file_rpc" version = "0.1.0" dependencies = [ + "bitflags", "parking_lot", "postcard", "serde", diff --git a/src/main.rs b/src/main.rs index 7146a7b..e8b04c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,13 +39,12 @@ impl file_rpc::Server for FileServ { fn read( &self, _fd: u64, - _pos: u64, _len: usize, ) -> std::result::Result, ()> { Err(()) } - fn write(&self, _fd: u64, _pos: u64, data: &[u8]) -> Result<(), ()> { + fn write(&self, _fd: u64, data: &[u8]) -> Result<(), ()> { let mut uart = self.0.lock(); for &byte in data { while !uart.read_line_status().contains(LineStatus::TRANSMIT_EMPTY) {} @@ -63,6 +62,8 @@ impl file_rpc::Server for FileServ { fn dup(&self, fd: u64) -> Option { Some(fd) } + + fn seek(&self, _fd: u64, _pos: file_rpc::SeekFrom) -> u64 { 0 } } fn main() {