diff --git a/Cargo.lock b/Cargo.lock index 08ad91a..d57381b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,6 +63,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "byteorder" @@ -128,6 +131,7 @@ checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" name = "file_rpc" version = "0.1.0" dependencies = [ + "bitflags", "parking_lot", "postcard", "serde", diff --git a/src/main.rs b/src/main.rs index df809cb..50a6fca 100644 --- a/src/main.rs +++ b/src/main.rs @@ -350,14 +350,13 @@ impl file_rpc::Server for FileServ { fn read( &self, _fd: u64, - _pos: u64, _len: usize, ) -> std::result::Result, ()> { Err(()) } #[allow(clippy::significant_drop_tightening)] - fn write(&self, _fd: u64, _pos: u64, data: &[u8]) -> Result<(), ()> { + fn write(&self, _fd: u64, data: &[u8]) -> Result<(), ()> { let string = str::from_utf8(data).map_err(|_| ())?; let mut fbwriter = self.fbwriter.lock(); let mut fbuffer = self.fbuffer.lock(); @@ -375,6 +374,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() {