mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Remove usage of legacy scheme paths on RedoxOS
The name:/path path syntax is getting phased out in favor of /scheme/name/path. Also using null: is no longer necessary as /dev/null is available on Redox OS too.
This commit is contained in:
parent
a2aba0578b
commit
83ee034d03
@ -484,7 +484,12 @@ pub fn current_exe() -> io::Result<PathBuf> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "redox", target_os = "rtems"))]
|
||||
#[cfg(target_os = "redox")]
|
||||
pub fn current_exe() -> io::Result<PathBuf> {
|
||||
crate::fs::read_to_string("/scheme/sys/exe").map(PathBuf::from)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "rtems")]
|
||||
pub fn current_exe() -> io::Result<PathBuf> {
|
||||
crate::fs::read_to_string("sys:exe").map(PathBuf::from)
|
||||
}
|
||||
|
@ -19,8 +19,6 @@ use crate::{fmt, io, ptr};
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_os = "fuchsia")] {
|
||||
// fuchsia doesn't have /dev/null
|
||||
} else if #[cfg(target_os = "redox")] {
|
||||
const DEV_NULL: &CStr = c"null:";
|
||||
} else if #[cfg(target_os = "vxworks")] {
|
||||
const DEV_NULL: &CStr = c"/null";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user