Use the new scheme format in most places

The graphics subsystem still uses the old format as orbital manually
parses the fpath result.
This commit is contained in:
bjorn3
2024-07-11 21:14:42 +02:00
parent 21b2e90d50
commit fd8dabd1bc
22 changed files with 56 additions and 56 deletions
+2 -2
View File
@@ -238,14 +238,14 @@ fn daemon(daemon: redox_daemon::Daemon) -> ! {
.expect("ided: failed to create disk scheme");
let primary_irq_fd = libredox::call::open(
&format!("irq:{}", primary_irq),
&format!("/scheme/irq/{}", primary_irq),
flag::O_RDWR | flag::O_NONBLOCK,
0,
).expect("ided: failed to open irq file");
let mut primary_irq_file = unsafe { File::from_raw_fd(primary_irq_fd as RawFd) };
let secondary_irq_fd = libredox::call::open(
&format!("irq:{}", secondary_irq),
&format!("/scheme/irq/{}", secondary_irq),
flag::O_RDWR | flag::O_NONBLOCK,
0,
).expect("ided: failed to open irq file");
+2 -2
View File
@@ -46,7 +46,7 @@ impl DiskScheme {
let mut size = 0;
// TODO: handle error
for line in std::fs::read_to_string("sys:env").context("failed to read env")?.lines() {
for line in std::fs::read_to_string("/scheme/sys/env").context("failed to read env")?.lines() {
let mut parts = line.splitn(2, '=');
let name = parts.next().unwrap_or("");
let value = parts.next().unwrap_or("");
@@ -69,7 +69,7 @@ impl DiskScheme {
let size = end - start;
let the_data = unsafe {
let file = File::open("memory:physical")?;
let file = File::open("/scheme/memory/physical")?;
let base = libredox::call::mmap(MmapArgs {
fd: file.as_raw_fd() as usize,
addr: core::ptr::null_mut(),
+1 -1
View File
@@ -66,7 +66,7 @@ struct CqReactor {
impl CqReactor {
fn create_event_queue(int_sources: &mut InterruptSources) -> Result<File> {
use libredox::flag::*;
let fd = libredox::call::open("event:", O_CLOEXEC | O_RDWR, 0)?;
let fd = libredox::call::open("/scheme/event", O_CLOEXEC | O_RDWR, 0)?;
let mut file = unsafe { File::from_raw_fd(fd as RawFd) };
for (num, irq_handle) in int_sources.iter_mut() {