Use renamed fmap call

This commit is contained in:
jD91mZM2
2020-08-17 13:57:39 +02:00
parent 7db83596a2
commit e33aea434f
3 changed files with 9 additions and 9 deletions
Generated
+3 -3
View File
@@ -302,7 +302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "redox_syscall"
version = "0.2.0"
source = "git+https://gitlab.redox-os.org/redox-os/syscall?rev=a0ea09ceb3380b1d1e878bb18886e13742d34e8a#a0ea09ceb3380b1d1e878bb18886e13742d34e8a"
source = "git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955#4115e0f43547449ce56f7d7749732813e9505955"
dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -322,7 +322,7 @@ dependencies = [
"posix-regex 0.1.0",
"ralloc 1.0.0",
"rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=a0ea09ceb3380b1d1e878bb18886e13742d34e8a)",
"redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955)",
"sc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -568,7 +568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
"checksum redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=a0ea09ceb3380b1d1e878bb18886e13742d34e8a)" = "<none>"
"checksum redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955)" = "<none>"
"checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
+1 -1
View File
@@ -39,7 +39,7 @@ optional = true
sc = "0.2.3"
[target.'cfg(target_os = "redox")'.dependencies]
redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall", rev = "a0ea09ceb3380b1d1e878bb18886e13742d34e8a" }
redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall", rev = "4115e0f43547449ce56f7d7749732813e9505955" }
spin = "0.4.10"
[features]
+5 -5
View File
@@ -1,7 +1,7 @@
use core::{mem, ptr, result::Result as CoreResult, slice};
use syscall::{
self,
data::{Map2, Stat as redox_stat, StatVfs as redox_statvfs, TimeSpec as redox_timespec},
data::{Map, Stat as redox_stat, StatVfs as redox_statvfs, TimeSpec as redox_timespec},
PtraceEvent, Result,
};
@@ -665,7 +665,7 @@ impl Pal for Sys {
fildes: c_int,
off: off_t,
) -> *mut c_void {
let map = Map2 {
let map = Map {
offset: off as usize,
size: len,
flags: syscall::MapFlags::from_bits_truncate(
@@ -683,13 +683,13 @@ impl Pal for Sys {
return !0 as *mut c_void;
}
let addr = e(syscall::fmap2(fd, &map)) as *mut c_void;
let addr = e(syscall::fmap(fd, &map)) as *mut c_void;
let _ = syscall::close(fd);
addr
} else {
e(syscall::fmap2(fildes as usize, &map)) as *mut c_void
e(syscall::fmap(fildes as usize, &map)) as *mut c_void
}
}
@@ -715,7 +715,7 @@ impl Pal for Sys {
}
unsafe fn munmap(addr: *mut c_void, len: usize) -> c_int {
if e(syscall::funmap2(addr as usize, len)) == !0 {
if e(syscall::funmap(addr as usize, len)) == !0 {
return !0;
}
0