Add seek function
This commit is contained in:
parent
2f55bfdfa3
commit
3b452fdf60
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user