Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for direct path to pci.ids #24

Merged
merged 1 commit into from
Jan 25, 2021
Merged

Conversation

pearsonk
Copy link

For systems placing the pci.ids database in a location other than
/usr/share/misc/pci.ids

Signed-off-by: Kevin Pearson kevin.pearson@ortmanconsulting.com

@pearsonk
Copy link
Author

This accommodates systems like OpenXT that store the PCI database in unconventional locations, or development systems that wish to use the database of a target system without reconfiguring the host environment.

Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little naming suggestion, otherwise this is awesome, thank you @pearsonk!

In prep for the v0.6.0 release, once this is merged I'll update the README docs to explain the various options that allow discovering/overriding the PCIIDS file.

context.go Outdated
@@ -25,6 +26,7 @@ func contextFromOptions(merged *WithOption) *context {
cacheOnly: *merged.CacheOnly,
cachePath: getCachePath(),
disableNetworkFetch: *merged.DisableNetworkFetch,
directPath: *merged.DirectPath,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we call this just Path instead of DirectPath? since it's an option, if Path is set, it overrides any of the auto-discovery features.

@pearsonk
Copy link
Author

Had an oops with a git rebase, will resubmit soon

For systems placing the pci.ids database in a location other than
<chroot>/usr/share/misc/pci.ids

Signed-off-by: Kevin Pearson <kevin.pearson@ortmanconsulting.com>
@pearsonk pearsonk reopened this Jan 22, 2021
@pearsonk
Copy link
Author

pearsonk commented Jan 22, 2021

Simplified DirectPath to Path, changed behavior to not enumerate cache or conventional locations when Path is set.

Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jaypipes jaypipes merged commit f3b478a into jaypipes:master Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants