Skip to content

Commit

Permalink
feat(lib/rep/gpu/linux/generic): get generic IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
onkoe committed Oct 29, 2024
1 parent 1cfe793 commit 927cc59
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions libghr/src/report/components/gpu/linux/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ use crate::prelude::internal::*;
// (see `asahi-drm` for a nice, readable impl)

#[tracing::instrument]
pub(super) async fn gpu(_path: &Path) -> GhrResult<ComponentInfo> {
// create a useless
pub(super) async fn gpu(path: &Path) -> GhrResult<ComponentInfo> {
// grab class, name, and vendor
let (class, id, vendor_id) = {
let civ = Civ::new(path).await;
(civ.class, civ.id, civ.vendor)
};

Ok(ComponentInfo {
bus: ComponentBus::Pci,
id: None,
class: None,
vendor_id: None,
id,
class,
vendor_id,
status: None,
desc: ComponentDescription::None,
})
Expand Down

0 comments on commit 927cc59

Please sign in to comment.