fix: udev-shim panic, sessiond duplicate, scheme Bad-fd handling
- udev-shim: replace .expect() with graceful errors (no more panic on Broken pipe) - P4-initfs: remove duplicate sessiond (conflicted with config) - accessibility/ime/keymapd: break instead of exit(1) on EBADF - P6 driver patches rebased - Docs: archive old reports, add implementation master plan
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/drivers/audio/ac97d/src/main.rs b/drivers/audio/ac97d/src/main.rs
|
||||
index ffa8a94b..29e189be 100644
|
||||
index ffa8a94b..641e3ef2 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) -> ! {
|
||||
@@ -7,7 +7,7 @@ index ffa8a94b..29e189be 100644
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("ac97d: subscribe IRQ failed");
|
||||
+ .expect("ac97d: failed");
|
||||
event_queue
|
||||
.subscribe(
|
||||
socket.inner().raw(),
|
||||
@@ -15,7 +15,7 @@ index ffa8a94b..29e189be 100644
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("ac97d: subscribe scheme failed");
|
||||
+ .expect("ac97d: failed");
|
||||
|
||||
register_sync_scheme(&socket, "audiohw", &mut device)
|
||||
.expect("ac97d: failed to register audiohw scheme to namespace");
|
||||
@@ -24,18 +24,18 @@ index ffa8a94b..29e189be 100644
|
||||
Source::Irq => {
|
||||
let mut irq = [0; 8];
|
||||
- irq_file.read(&mut irq).unwrap();
|
||||
+ irq_file.read(&mut irq).expect("ac97d: IRQ read failed");
|
||||
+ irq_file.read(&mut irq).expect("ac97d: failed");
|
||||
|
||||
if !device.irq() {
|
||||
continue;
|
||||
}
|
||||
- irq_file.write(&mut irq).unwrap();
|
||||
+ irq_file.write(&mut irq).expect("ac97d: IRQ ack failed");
|
||||
+ irq_file.write(&mut irq).expect("ac97d: 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
|
||||
index 31a2add7..4a932bfd 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) -> ! {
|
||||
@@ -43,7 +43,7 @@ index 31a2add7..8291a550 100755
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("ihdad: subscribe scheme failed");
|
||||
+ .expect("ihdad: failed");
|
||||
event_queue
|
||||
.subscribe(
|
||||
irq_file.irq_handle().as_raw_fd() as usize,
|
||||
@@ -51,7 +51,7 @@ index 31a2add7..8291a550 100755
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("ihdad: subscribe IRQ failed");
|
||||
+ .expect("ihdad: failed");
|
||||
|
||||
libredox::call::setrens(0, 0).expect("ihdad: failed to enter null namespace");
|
||||
|
||||
@@ -60,13 +60,13 @@ index 31a2add7..8291a550 100755
|
||||
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");
|
||||
+ irq_file.irq_handle().read(&mut irq).expect("ihdad: 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");
|
||||
+ irq_file.irq_handle().write(&mut irq).expect("ihdad: failed");
|
||||
|
||||
readiness_based
|
||||
.poll_all_requests(&mut device)
|
||||
@@ -94,7 +94,7 @@ index 373ea9b3..c66cccd1 100644
|
||||
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
|
||||
index 1d9963a3..06d9ff58 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) -> ! {
|
||||
@@ -102,7 +102,7 @@ index 1d9963a3..5dc244af 100644
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("rtl8168d: subscribe IRQ failed");
|
||||
+ .expect("rtl8168d: failed");
|
||||
event_queue
|
||||
.subscribe(
|
||||
scheme.event_handle().raw(),
|
||||
@@ -110,66 +110,53 @@ index 1d9963a3..5dc244af 100644
|
||||
event::EventFlags::READ,
|
||||
)
|
||||
- .unwrap();
|
||||
+ .expect("rtl8168d: subscribe scheme failed");
|
||||
+ .expect("rtl8168d: failed");
|
||||
|
||||
libredox::call::setrens(0, 0).expect("rtl8168d: failed to enter null namespace");
|
||||
|
||||
- scheme.tick().unwrap();
|
||||
+ scheme.tick().expect("rtl8168d: tick failed");
|
||||
+ scheme.tick().expect("rtl8168d: 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");
|
||||
+ irq_file.irq_handle().read(&mut irq).expect("rtl8168d: 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");
|
||||
+ irq_file.irq_handle().write(&mut irq).expect("rtl8168d: failed");
|
||||
|
||||
- scheme.tick().unwrap();
|
||||
+ scheme.tick().expect("rtl8168d: tick failed");
|
||||
+ scheme.tick().expect("rtl8168d: failed");
|
||||
}
|
||||
}
|
||||
Source::Scheme => {
|
||||
- scheme.tick().unwrap();
|
||||
+ scheme.tick().expect("rtl8168d: tick failed");
|
||||
+ scheme.tick().expect("rtl8168d: failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/storage/ahcid/src/main.rs b/drivers/storage/ahcid/src/main.rs
|
||||
index 1f130a29..9a0e3e0d 100644
|
||||
index 1f130a29..4c7a1412 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");
|
||||
@@ -69,9 +69,9 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
||||
.expect("ahcid: failed to event irq scheme");
|
||||
|
||||
for event in event_queue {
|
||||
- let event = event.unwrap();
|
||||
+ let event = event.expect("ahcid: event failed");
|
||||
+ let event = event.expect("ahcid: event error");
|
||||
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
|
||||
@@ -96,7 +96,7 @@ fn daemon(daemon: daemon::Daemon, mut pcid_handle: PciFunctionHandle) -> ! {
|
||||
.write(&irq)
|
||||
- .expect("ahcid: failed to write irq file");
|
||||
+ .expect("ahcid: IRQ failed");
|
||||
.expect("ahcid: failed to write irq file");
|
||||
|
||||
- FuturesExecutor.block_on(scheme.tick()).unwrap();
|
||||
+ FuturesExecutor.block_on(scheme.tick()).expect("ahcid: tick failed");
|
||||
|
||||
Reference in New Issue
Block a user