From 3b452fdf60989ccda456812feed7695a7e415a4b Mon Sep 17 00:00:00 2001 From: pjht Date: Mon, 30 Sep 2024 13:33:22 -0500 Subject: [PATCH] Add seek function --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f30c4f2..1f4003a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,6 @@ impl file_rpc::Server for FileServ { fn read( &self, _fd: u64, - _pos: u64, len: usize, ) -> std::result::Result, ()> { let mut encode_buf = [0u8; 4]; @@ -58,7 +57,7 @@ impl file_rpc::Server for FileServ { Ok(buf.into()) } - fn write(&self, _fd: u64, _pos: u64, _data: &[u8]) -> Result<(), ()> { + fn write(&self, _fd: u64, _data: &[u8]) -> Result<(), ()> { Err(()) } @@ -103,6 +102,8 @@ impl file_rpc::Server for FileServ { fn cancel_poll(&self, poll_id: u64) { self.polls.lock().remove(poll_id as usize); } + + fn seek(&self, _fd: u64, _pos: file_rpc::SeekFrom) -> u64 { 0 } } static SCANDODE_DECODER: Mutex = Mutex::new(ScancodeSet2::new());