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 function to get the PCI bus ID for a device #41

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

elezar
Copy link
Member

@elezar elezar commented Jun 11, 2024

This change adds a Device function to return the PCI Bus ID for a Device.

Comment on lines +161 to +163
if id != "0000" {
id = strings.TrimPrefix(id, "0000")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If I recall correctly, some systems had 8 leading numbers and some 4. I guess this is handling the case when there are 8 leading numbers but the first 4 are 0000. Is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. That's correct.

Copy link

@visheshtanksale visheshtanksale left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks for adding it.

@elezar elezar force-pushed the add-get-pci-busid branch from aa3c471 to d60aa34 Compare June 17, 2024 12:56
@elezar elezar merged commit a408243 into NVIDIA:main Jun 17, 2024
4 checks passed
@elezar elezar deleted the add-get-pci-busid branch June 17, 2024 12:58
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.

3 participants