ghw icon indicating copy to clipboard operation
ghw copied to clipboard

linux / windows compatibility

Open limbo127 opened this issue 4 months ago • 2 comments

Hello, i'm using very basic example : host,err:=ghw.Host()

After the last commit, it's correct the error about accelerator, however i now this:

pciFillInfo not implemented on https://github.com/jaypipes/ghw/tree/main/pkg/pci)/pci_stub.go

no detect the first time, sorry

limbo127 avatar Aug 04 '25 14:08 limbo127

@limbo127 Yes, PCI inspection is not supported on Windows yet. Instead of using ghw.Host() (which iterates over all of the individual modules in ghw), you can use the individual modules like so:

block, err := ghw.Block()

that will only grab the information for the block devices, etc.

jaypipes avatar Aug 04 '25 14:08 jaypipes

Yes i know, but it's more easy to use ghw.Host for linux/windows hardware, i can use each function, but why stub return error , perhaps just return nil is suffisant ? Regards, Nicolas

limbo127 avatar Aug 04 '25 15:08 limbo127