Merge branch 'no_legacy_scheme' into 'master'

Remove all uses of the legacy scheme syntax

See merge request redox-os/relibc!492
This commit is contained in:
Jeremy Soller
2024-08-15 14:57:30 +00:00
15 changed files with 39 additions and 35 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ use crate::{
};
pub(super) unsafe fn openpty(name: &mut [u8]) -> Result<(c_int, c_int), ()> {
let master = fcntl::open(c_str!("pty:").as_ptr(), fcntl::O_RDWR, 0);
let master = fcntl::open(c_str!("/scheme/pty").as_ptr(), fcntl::O_RDWR, 0);
if master < 0 {
return Err(());
}
+1 -1
View File
@@ -746,7 +746,7 @@ pub unsafe extern "C" fn posix_memalign(
#[no_mangle]
pub unsafe extern "C" fn posix_openpt(flags: c_int) -> c_int {
#[cfg(target_os = "redox")]
let r = open((b"pty:\0" as *const u8).cast(), O_CREAT);
let r = open((b"/scheme/pty\0" as *const u8).cast(), O_CREAT);
#[cfg(target_os = "linux")]
let r = open((b"/dev/ptmx\0" as *const u8).cast(), flags);
+1 -1
View File
@@ -111,7 +111,7 @@ pub unsafe extern "C" fn madvise(addr: *mut c_void, len: size_t, flags: c_int) -
static SHM_PATH: &'static [u8] = b"/dev/shm/";
#[cfg(target_os = "redox")]
static SHM_PATH: &'static [u8] = b"shm:";
static SHM_PATH: &'static [u8] = b"/scheme/shm/";
unsafe fn shm_path(name: *const c_char) -> CString {
let name_c = CStr::from_ptr(name);