Add seek function

This commit is contained in:
pjht 2024-09-30 13:33:22 -05:00
parent 2f55bfdfa3
commit 3b452fdf60
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A

View File

@ -35,7 +35,6 @@ impl file_rpc::Server for FileServ {
fn read( fn read(
&self, &self,
_fd: u64, _fd: u64,
_pos: u64,
len: usize, len: usize,
) -> std::result::Result<std::borrow::Cow<'_, [u8]>, ()> { ) -> std::result::Result<std::borrow::Cow<'_, [u8]>, ()> {
let mut encode_buf = [0u8; 4]; let mut encode_buf = [0u8; 4];
@ -58,7 +57,7 @@ impl file_rpc::Server for FileServ {
Ok(buf.into()) Ok(buf.into())
} }
fn write(&self, _fd: u64, _pos: u64, _data: &[u8]) -> Result<(), ()> { fn write(&self, _fd: u64, _data: &[u8]) -> Result<(), ()> {
Err(()) Err(())
} }
@ -103,6 +102,8 @@ impl file_rpc::Server for FileServ {
fn cancel_poll(&self, poll_id: u64) { fn cancel_poll(&self, poll_id: u64) {
self.polls.lock().remove(poll_id as usize); self.polls.lock().remove(poll_id as usize);
} }
fn seek(&self, _fd: u64, _pos: file_rpc::SeekFrom) -> u64 { 0 }
} }
static SCANDODE_DECODER: Mutex<ScancodeSet2> = Mutex::new(ScancodeSet2::new()); static SCANDODE_DECODER: Mutex<ScancodeSet2> = Mutex::new(ScancodeSet2::new());