Update to pci_types 0.10.1

And avoid hiding channel open errors in pcid-spawner. This would have
made the location of the problem more obvious.
This commit is contained in:
bjorn3
2026-02-07 18:02:32 +01:00
parent f2ffbf1eb5
commit 7f0e870b76
5 changed files with 14 additions and 8 deletions
Generated
+2 -2
View File
@@ -1458,9 +1458,9 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
[[package]]
name = "pci_types"
version = "0.10.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4325c6aa3cca3373503b1527e75756f9fbfe5fd76be4b4c8a143ee47430b8e0"
checksum = "f0c2a105c657261a938ff68ee231c199a3d80eef33976004829de761ef5b1a9b"
dependencies = [
"bit_field",
"bitflags 2.10.0",
+8 -2
View File
@@ -40,14 +40,20 @@ fn main() -> Result<()> {
let mut handle = match PciFunctionHandle::connect_by_path(&device_path) {
Ok(handle) => handle,
Err(err) => {
// Either the device is gone or it is already in-use by a driver.
Err(err) if err.raw_os_error() == Some(syscall::ENOLCK) => {
log::debug!(
"pcid-spawner: {} already in use: {err}",
device_path.display(),
);
continue;
}
Err(err) => {
log::error!(
"pcid-spawner: failed to open channel for {}: {err}",
device_path.display(),
);
continue;
}
};
let full_device_id = handle.config().func.full_device_id;
+1 -1
View File
@@ -16,7 +16,7 @@ bincode = "1.2"
fdt = "0.1.5"
libc.workspace = true
log.workspace = true
pci_types = "=0.10.0"
pci_types = "0.10.1"
pico-args = { version = "0.5", features = ["combined-flags"] }
plain = "0.2"
redox-scheme.workspace = true
+1 -2
View File
@@ -331,8 +331,7 @@ impl PciFunctionHandle {
device_path.join("channel").to_str().unwrap(),
libredox::flag::O_RDWR,
0,
)
.map_err(|err| io::Error::other(format!("failed to open pcid channel: {}", err)))?;
)?;
Ok(Self::connect_common(channel_fd as RawFd))
}
+2 -1
View File
@@ -436,7 +436,8 @@ impl PciScheme {
}
fn parse_pci_addr(addr: &str) -> Option<PciAddress> {
let (segment, rest) = addr.split_once('-')?;
// FIXME use : instead of -- as separator once the old scheme format is no longer supported.
let (segment, rest) = addr.split_once("--")?;
let segment = u16::from_str_radix(segment, 16).ok()?;
// FIXME use : instead of -- as separator once the old scheme format is no longer supported.