1
0
Fork 0
forked from wry/wry

it: map keymap with MAP_PRIVATE

This commit is contained in:
Julian Orth 2024-11-28 10:55:05 +01:00
parent 723608ce77
commit bfe76e101b
3 changed files with 25 additions and 3 deletions

View file

@ -31,7 +31,7 @@ impl TestVirtualKeyboard {
uapi::lseek(memfd.raw(), 0, c::SEEK_SET).unwrap();
uapi::fcntl_add_seals(
memfd.raw(),
c::F_SEAL_SEAL | c::F_SEAL_GROW | c::F_SEAL_SHRINK | c::F_SEAL_WRITE,
c::F_SEAL_SEAL | c::F_SEAL_GROW | c::F_SEAL_SHRINK,
)
.unwrap();
self.tran.send(Keymap {

View file

@ -149,7 +149,7 @@ async fn test(run: Rc<TestRun>) -> TestResult {
}
fn read_keymap(fd: &Rc<OwnedFd>, size: usize) -> String {
let client_mem = ClientMem::new(fd, size - 1, true, None, None).unwrap();
let client_mem = ClientMem::new_private(fd, size - 1, true, None, None).unwrap();
let client_mem = Rc::new(client_mem).offset(0);
let mut v = vec![];
client_mem.read(&mut v).unwrap();