11993af01f
Base: fix P6-driver-new-modules.patch (ed format -> unified diff) for new driver modules (ncq, itr, phy). P6-driver-main-fixes.patch now applies with offset on current upstream source. Relibc: remove stale P5-named-semaphores (upstream has stubs), add P10-stack-size-8mb and P11-getrlimit-getrusage (per-process rlimit table, sysconf integration, getdtablesize fix, null-pointer safety). Kernel: consolidate 29 individual patches into single redbear-consolidated.patch. Userutils: P5-redbear-branding replaces P4-login-rate-limit. Recipe.toml changes now committed so they survive source resets.
179 lines
7.4 KiB
Diff
179 lines
7.4 KiB
Diff
diff --git a/drivers/audio/ac97d/src/main.rs b/drivers/audio/ac97d/src/main.rs
|
|
index ffa8a94b..29e189be 100644
|
|
--- a/drivers/audio/ac97d/src/main.rs
|
|
+++ b/drivers/audio/ac97d/src/main.rs
|
|
@@ -63,14 +63,14 @@ fn daemon(daemon: daemon::Daemon, pcid_handle: PciFunctionHandle) -> ! {
|
|
Source::Irq,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("ac97d: subscribe IRQ failed");
|
|
event_queue
|
|
.subscribe(
|
|
socket.inner().raw(),
|
|
Source::Scheme,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("ac97d: subscribe scheme failed");
|
|
|
|
register_sync_scheme(&socket, "audiohw", &mut device)
|
|
.expect("ac97d: failed to register audiohw scheme to namespace");
|
|
@@ -86,12 +86,12 @@ fn daemon(daemon: daemon::Daemon, pcid_handle: PciFunctionHandle) -> ! {
|
|
match event {
|
|
Source::Irq => {
|
|
let mut irq = [0; 8];
|
|
- irq_file.read(&mut irq).unwrap();
|
|
+ irq_file.read(&mut irq).expect("ac97d: IRQ read failed");
|
|
|
|
if !device.irq() {
|
|
continue;
|
|
}
|
|
- irq_file.write(&mut irq).unwrap();
|
|
+ irq_file.write(&mut irq).expect("ac97d: IRQ ack failed");
|
|
|
|
readiness_based
|
|
.poll_all_requests(&mut device)
|
|
diff --git a/drivers/audio/ihdad/src/main.rs b/drivers/audio/ihdad/src/main.rs
|
|
index 31a2add7..8291a550 100755
|
|
--- a/drivers/audio/ihdad/src/main.rs
|
|
+++ b/drivers/audio/ihdad/src/main.rs
|
|
@@ -71,14 +71,14 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
Source::Scheme,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("ihdad: subscribe scheme failed");
|
|
event_queue
|
|
.subscribe(
|
|
irq_file.irq_handle().as_raw_fd() as usize,
|
|
Source::Irq,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("ihdad: subscribe IRQ failed");
|
|
|
|
libredox::call::setrens(0, 0).expect("ihdad: failed to enter null namespace");
|
|
|
|
@@ -91,12 +91,12 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
match event {
|
|
Source::Irq => {
|
|
let mut irq = [0; 8];
|
|
- irq_file.irq_handle().read(&mut irq).unwrap();
|
|
+ irq_file.irq_handle().read(&mut irq).expect("ihdad: IRQ read failed");
|
|
|
|
if !device.irq() {
|
|
continue;
|
|
}
|
|
- irq_file.irq_handle().write(&mut irq).unwrap();
|
|
+ irq_file.irq_handle().write(&mut irq).expect("ihdad: IRQ ack failed");
|
|
|
|
readiness_based
|
|
.poll_all_requests(&mut device)
|
|
diff --git a/drivers/net/e1000d/src/main.rs b/drivers/net/e1000d/src/main.rs
|
|
index 373ea9b3..c66cccd1 100644
|
|
--- a/drivers/net/e1000d/src/main.rs
|
|
+++ b/drivers/net/e1000d/src/main.rs
|
|
@@ -70,15 +70,15 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
|
|
libredox::call::setrens(0, 0).expect("e1000d: failed to enter null namespace");
|
|
|
|
- scheme.tick().unwrap();
|
|
+ scheme.tick().expect("e1000d: tick failed");
|
|
|
|
for event in event_queue.map(|e| e.expect("e1000d: failed to get event")) {
|
|
match event.user_data {
|
|
Source::Irq => {
|
|
let mut irq = [0; 8];
|
|
- irq_file.read(&mut irq).unwrap();
|
|
+ irq_file.read(&mut irq).expect("e1000d: IRQ read failed");
|
|
if unsafe { scheme.adapter().irq() } {
|
|
- irq_file.write(&mut irq).unwrap();
|
|
+ irq_file.write(&mut irq).expect("e1000d: IRQ ack failed");
|
|
|
|
scheme.tick().expect("e1000d: failed to handle IRQ")
|
|
}
|
|
diff --git a/drivers/net/rtl8168d/src/main.rs b/drivers/net/rtl8168d/src/main.rs
|
|
index 1d9963a3..5dc244af 100644
|
|
--- a/drivers/net/rtl8168d/src/main.rs
|
|
+++ b/drivers/net/rtl8168d/src/main.rs
|
|
@@ -81,33 +81,33 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
Source::Irq,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("rtl8168d: subscribe IRQ failed");
|
|
event_queue
|
|
.subscribe(
|
|
scheme.event_handle().raw(),
|
|
Source::Scheme,
|
|
event::EventFlags::READ,
|
|
)
|
|
- .unwrap();
|
|
+ .expect("rtl8168d: subscribe scheme failed");
|
|
|
|
libredox::call::setrens(0, 0).expect("rtl8168d: failed to enter null namespace");
|
|
|
|
- scheme.tick().unwrap();
|
|
+ scheme.tick().expect("rtl8168d: tick failed");
|
|
|
|
for event in event_queue.map(|e| e.expect("rtl8168d: failed to get next event")) {
|
|
match event.user_data {
|
|
Source::Irq => {
|
|
let mut irq = [0; 8];
|
|
- irq_file.irq_handle().read(&mut irq).unwrap();
|
|
+ irq_file.irq_handle().read(&mut irq).expect("rtl8168d: IRQ read failed");
|
|
//TODO: This may be causing spurious interrupts
|
|
if unsafe { scheme.adapter_mut().irq() } {
|
|
- irq_file.irq_handle().write(&mut irq).unwrap();
|
|
+ irq_file.irq_handle().write(&mut irq).expect("rtl8168d: IRQ ack failed");
|
|
|
|
- scheme.tick().unwrap();
|
|
+ scheme.tick().expect("rtl8168d: tick failed");
|
|
}
|
|
}
|
|
Source::Scheme => {
|
|
- scheme.tick().unwrap();
|
|
+ scheme.tick().expect("rtl8168d: tick failed");
|
|
}
|
|
}
|
|
}
|
|
diff --git a/drivers/storage/ahcid/src/main.rs b/drivers/storage/ahcid/src/main.rs
|
|
index 1f130a29..9a0e3e0d 100644
|
|
--- a/drivers/storage/ahcid/src/main.rs
|
|
+++ b/drivers/storage/ahcid/src/main.rs
|
|
@@ -66,17 +66,17 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
.expect("ahcid: failed to event scheme socket");
|
|
event_queue
|
|
.subscribe(irq_fd, 1, EventFlags::READ)
|
|
- .expect("ahcid: failed to event irq scheme");
|
|
+ .expect("ahcid: IRQ failed");
|
|
|
|
for event in event_queue {
|
|
- let event = event.unwrap();
|
|
+ let event = event.expect("ahcid: event failed");
|
|
if event.fd == scheme.event_handle().raw() {
|
|
- FuturesExecutor.block_on(scheme.tick()).unwrap();
|
|
+ FuturesExecutor.block_on(scheme.tick()).expect("ahcid: tick failed");
|
|
} else if event.fd == irq_fd {
|
|
let mut irq = [0; 8];
|
|
if irq_file
|
|
.read(&mut irq)
|
|
- .expect("ahcid: failed to read irq file")
|
|
+ .expect("ahcid: IRQ failed")
|
|
>= irq.len()
|
|
{
|
|
let is = hba_mem.is.read();
|
|
@@ -94,9 +94,9 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
|
|
|
irq_file
|
|
.write(&irq)
|
|
- .expect("ahcid: failed to write irq file");
|
|
+ .expect("ahcid: IRQ failed");
|
|
|
|
- FuturesExecutor.block_on(scheme.tick()).unwrap();
|
|
+ FuturesExecutor.block_on(scheme.tick()).expect("ahcid: tick failed");
|
|
}
|
|
}
|
|
} else {
|