jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

pci: don't pass chroot to pcidb with snapshots #286

Closed ffromani closed 2 years ago

ffromani commented 2 years ago

The snapshot implementation leverages chroot and transparently set it to the unpacked snapshot root. This is the intentional behaviour and ghw supports it. But the pci package passes throu the chroot settings to pcidb and the latter doesn't know or care about ghw snapshots - and rightly so!

Hence, we need to pass through the chroot setting only if explicitely set by client code - so if no snapshot settings are present.

Signed-off-by: Francesco Romani fromani@redhat.com