Verified Commit ac64d091 authored by jD91mZM2's avatar jD91mZM2
Browse files

vesad: Provide legacy fmap implementation

parent 321f708d
This diff is collapsed.
......@@ -23,3 +23,4 @@ members = [
[patch.crates-io]
mio = { git = "https://gitlab.redox-os.org/redox-os/mio.git", branch = "redox-unix" }
net2 = { git = "https://gitlab.redox-os.org/redox-os/net2-rs.git", branch = "redox-unix" }
orbclient = { path = "/home/user/redox-nix/forks/orbclient", version = "0.3.28" }
......@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
use std::{mem, slice, str};
use orbclient::{Event, EventOption};
use syscall::{Error, EventFlags, EACCES, EBADF, EINVAL, ENOENT, Map, O_NONBLOCK, Result, SchemeMut};
use syscall::{Error, EventFlags, EACCES, EBADF, EINVAL, ENOENT, Map, OldMap, O_NONBLOCK, Result, SchemeMut};
use crate::display::Display;
use crate::screen::{Screen, GraphicScreen, TextScreen};
......@@ -156,6 +156,14 @@ impl SchemeMut for DisplayScheme {
Err(Error::new(EBADF))
}
fn fmap_old(&mut self, id: usize, map: &syscall::OldMap) -> syscall::Result<usize> {
self.fmap(id, &Map {
offset: map.offset,
size: map.size,
flags: map.flags,
address: 0,
})
}
fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result<usize> {
let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment