76b75d80b4
Consolidate ~30 absorbed base patches into surviving carriers. Add new init service files, driver sources, and network/storage modules for the base recipe. Move absorbed patches to local/patches/base/absorbed/. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
--- a/drivers/pcid/src/scheme.rs
|
|
+++ b/drivers/pcid/src/scheme.rs
|
|
@@ -20,6 +20,7 @@ pub struct PciScheme {
|
|
Channel { addr: PciAddress, st: ChannelState },
|
|
// Uevent surface for hotplug consumers. pcid currently only scans at
|
|
// startup, so the surface exists for polling readers and will return no
|
|
// data until hotplug support grows real events.
|
|
Uevent,
|
|
SchemeRoot,
|
|
}
|
|
@@ -33,7 +34,7 @@ impl Handle {
|
|
fn is_file(&self) -> bool {
|
|
matches!(
|
|
self,
|
|
- Self::Access | Self::Config { .. } | Self::Channel { .. }
|
|
+ Self::Access | Self::Config { .. } | Self::Channel { .. } | Self::Uevent
|
|
)
|
|
}
|
|
fn is_dir(&self) -> bool {
|
|
@@ -106,6 +107,8 @@ impl SchemeSync for PciScheme {
|
|
Handle::Access
|
|
} else if path == "uevent" {
|
|
Handle::Uevent
|
|
} else {
|
|
let idx = path.find('/').unwrap_or(path.len());
|
|
@@ -142,6 +145,7 @@ impl SchemeSync for PciScheme {
|
|
Handle::Access | Handle::Channel { .. } => (0, MODE_CHR | 0o600),
|
|
+ Handle::Uevent => (0, MODE_CHR | 0o644),
|
|
Handle::SchemeRoot => return Err(Error::new(EBADF)),
|
|
};
|
|
stat.st_size = len as u64;
|
|
@@ -180,6 +184,10 @@ impl SchemeSync for PciScheme {
|
|
ref mut st,
|
|
} => Self::read_channel(st, buf),
|
|
+ Handle::Uevent => {
|
|
+ // The surface is intentionally present before pcid gains real
|
|
+ // hotplug event delivery so consumers can open/poll it
|
|
+ // consistently across boot/runtime environments.
|
|
+ Ok(0)
|
|
+ }
|
|
Handle::SchemeRoot => Err(Error::new(EBADF)),
|
|
_ => Err(Error::new(EBADF)),
|
|
}
|
|
@@ -222,7 +230,7 @@ impl SchemeSync for PciScheme {
|
|
Handle::Device => DEVICE_CONTENTS,
|
|
- Handle::Access | Handle::Config { .. } | Handle::Channel { .. } => {
|
|
+ Handle::Access | Handle::Config { .. } | Handle::Channel { .. } | Handle::Uevent => {
|
|
return Err(Error::new(ENOTDIR));
|
|
}
|
|
Handle::SchemeRoot => return Err(Error::new(EBADF)),
|