From db7203b36178bf08ea593aa254ef9f8230864ff5 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Mon, 12 Oct 2026 12:14:43 +0000 Subject: [PATCH] docs(examine): say a Device's path is the logical host path stat_device documents that it reads a node through host_path but reports the logical path. That invariant belongs on the public, serialized Device too, where a consumer of `rocm examine --json` will look for it. Follows up the review on #510. Signed-off-by: Roman Inflianskas --- crates/rocm-core/src/examine.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/rocm-core/src/examine.rs b/crates/rocm-core/src/examine.rs index bad9aa6058..a0db6f25c6 100644 --- a/crates/rocm-core/src/examine.rs +++ b/crates/rocm-core/src/examine.rs @@ -85,8 +85,14 @@ pub struct Gpu { } /// Stat of a device node such as `/dev/kfd` or `/dev/dri/renderD*`. +/// +/// `path` is always the logical host path (`/dev/kfd`), as `rocm examine +/// --json` reports it. When a test build re-roots hardware probes (see +/// [`crate::host_path`]), the node is read under that root, but the root never +/// appears here. #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] pub struct Device { + /// The logical host path of the node, never the re-rooted one. pub path: String, pub exists: bool, pub mode: String,