MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / vfio_id_string

Function vfio_id_string

crates/openshell-vfio/src/bind.rs:22–24  ·  view source on GitHub ↗

Read vendor and device IDs from sysfs and format as `"VVVV DDDD"` (no `0x` prefix).

(sysfs: &SysfsRoot, bdf: &str)

Source from the content-addressed store, hash-verified

20
21/// Read vendor and device IDs from sysfs and format as `"VVVV DDDD"` (no `0x` prefix).
22pub(crate) fn vfio_id_string(sysfs: &SysfsRoot, bdf: &str) -> Option<String> {
23 sysfs.pci_device_ref(bdf).vfio_id_string()
24}
25
26/// Best-effort registration of a device's vendor:device ID with `vfio-pci`.
27///

Callers 7

adoptMethod · 0.85
adopt_groupMethod · 0.85
register_vfio_new_idFunction · 0.85
deregister_vfio_new_idFunction · 0.85

Calls 2

vfio_id_stringMethod · 0.80
pci_device_refMethod · 0.80

Tested by

no test coverage detected