From 81210b9ed0f6d430dbec085f9cd87eae9f9eada4 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 13 Mar 2025 18:47:01 +0100 Subject: [PATCH] Update and re-enable the legacy scheme deprecation warnings I've tested booting, several cosmic apps and netsurf as not causing any warning with the new set of exclusions and all my recent MR's merged. --- src/syscall/fs.rs | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/syscall/fs.rs b/src/syscall/fs.rs index 2c3c1e362e..52ba6c8900 100644 --- a/src/syscall/fs.rs +++ b/src/syscall/fs.rs @@ -71,20 +71,19 @@ pub fn open(raw_path: UserSliceRo, flags: usize) -> Result { // Display a deprecation warning for any usage of the legacy scheme syntax (scheme:/path) // FIXME remove entries from this list as the respective programs get updated - // if path_buf.contains(':') - // && !path_buf.starts_with(':') - // && path_buf != "rand:" // FIXME Remove exception at next rustc update - // && !path_buf.starts_with("thisproc:") // bootstrap needs redox-rt update - // && !path_buf.starts_with("display") - // && !path_buf.starts_with("orbital:") - // { - // let name = context::current().read().name.clone(); - // if !name.contains("cosmic") - // // FIXME cosmic apps need crate updates - // { - // println!("deprecated: legacy path {:?} used by {}", path_buf, name); - // } - // } + if path_buf.contains(':') + && !path_buf.starts_with(':') + && path_buf != "null:" // FIXME Remove exception at next rustc update (rust#138457) + && path_buf != "sys:exe" // FIXME Remove exception at next rustc update (rust#138457) + && !path_buf.starts_with("orbital:") + { + let name = context::current().read().name.clone(); + if name.contains("cosmic") && (path_buf == "event:" || path_buf.starts_with("time:")) { + // FIXME cosmic apps likely need crate updates + } else { + println!("deprecated: legacy path {:?} used by {}", path_buf, name); + } + } let path = RedoxPath::from_absolute(&path_buf).ok_or(Error::new(EINVAL))?; let (scheme_name, reference) = path.as_parts().ok_or(Error::new(EINVAL))?;