From 6738171da70c014e01b5fdab321d9e40cf081b73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 06:14:21 +0000 Subject: [PATCH] Bump github.com/jaypipes/ghw from 0.19.1 to 0.20.0 Bumps [github.com/jaypipes/ghw](https://github.com/jaypipes/ghw) from 0.19.1 to 0.20.0. - [Release notes](https://github.com/jaypipes/ghw/releases) - [Commits](https://github.com/jaypipes/ghw/compare/v0.19.1...v0.20.0) --- updated-dependencies: - dependency-name: github.com/jaypipes/ghw dependency-version: 0.20.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/jaypipes/ghw/pkg/block/block.go | 2 +- .../jaypipes/ghw/pkg/block/block_windows.go | 5 +++-- vendor/github.com/jaypipes/ghw/pkg/pci/pci.go | 3 +++ vendor/github.com/jaypipes/ghw/pkg/pci/pci_linux.go | 12 ++++++++++++ .../jaypipes/ghw/pkg/snapshot/clonetree_pci_linux.go | 1 + vendor/modules.txt | 2 +- 8 files changed, 24 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index ddeecb655c4..13cf6ac02ab 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/distribution/distribution v2.8.1+incompatible github.com/google/go-containerregistry v0.20.3 github.com/hashicorp/go-multierror v1.1.1 - github.com/jaypipes/ghw v0.19.1 + github.com/jaypipes/ghw v0.20.0 github.com/joho/godotenv v1.5.1 github.com/mitchellh/mapstructure v1.5.0 github.com/onsi/ginkgo/v2 v2.27.2 diff --git a/go.sum b/go.sum index a3041608564..eaf5bb47f16 100644 --- a/go.sum +++ b/go.sum @@ -153,8 +153,8 @@ github.com/itchyny/gojq v0.12.16 h1:yLfgLxhIr/6sJNVmYfQjTIv0jGctu6/DgDoivmxTr7g= github.com/itchyny/gojq v0.12.16/go.mod h1:6abHbdC2uB9ogMS38XsErnfqJ94UlngIJGlRAIj4jTM= github.com/itchyny/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q= github.com/itchyny/timefmt-go v0.1.6/go.mod h1:RRDZYC5s9ErkjQvTvvU7keJjxUYzIISJGxm9/mAERQg= -github.com/jaypipes/ghw v0.19.1 h1:Lhybk6aadgEJqIxeS0h07UOL/EgMGIdxbAy6V8J7RgY= -github.com/jaypipes/ghw v0.19.1/go.mod h1:GPrvwbtPoxYUenr74+nAnWbardIZq600vJDD5HnPsPE= +github.com/jaypipes/ghw v0.20.0 h1:8efvHHtyrj0P4qVZ9KE43iW9tMThKoh6dEOo38f3a4w= +github.com/jaypipes/ghw v0.20.0/go.mod h1:GPrvwbtPoxYUenr74+nAnWbardIZq600vJDD5HnPsPE= github.com/jaypipes/pcidb v1.1.1 h1:QmPhpsbmmnCwZmHeYAATxEaoRuiMAJusKYkUncMC0ro= github.com/jaypipes/pcidb v1.1.1/go.mod h1:x27LT2krrUgjf875KxQXKB0Ha/YXLdZRVmw6hH0G7g8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= diff --git a/vendor/github.com/jaypipes/ghw/pkg/block/block.go b/vendor/github.com/jaypipes/ghw/pkg/block/block.go index 088060185fb..016b5c7de49 100644 --- a/vendor/github.com/jaypipes/ghw/pkg/block/block.go +++ b/vendor/github.com/jaypipes/ghw/pkg/block/block.go @@ -251,7 +251,7 @@ type Disk struct { type Partition struct { // Disk is a pointer to the `Disk` struct that houses this partition. Disk *Disk `json:"-"` - // Name is the system name given to the partition, e.g. "sda1". + // Name is the system given or user given name to the partition, e.g. "sda1". Name string `json:"name"` // Label is the human-readable label given to the partition. On Linux, this // is derived from the `ID_PART_ENTRY_NAME` udev entry. diff --git a/vendor/github.com/jaypipes/ghw/pkg/block/block_windows.go b/vendor/github.com/jaypipes/ghw/pkg/block/block_windows.go index 09f44a3a18e..cbb052a853e 100644 --- a/vendor/github.com/jaypipes/ghw/pkg/block/block_windows.go +++ b/vendor/github.com/jaypipes/ghw/pkg/block/block_windows.go @@ -85,7 +85,7 @@ type win32LogicalDiskToPartition struct { Dependent *string } -const wqlLogicalDisk = "SELECT Caption, CreationClassName, Description, DeviceID, FileSystem, FreeSpace, Name, Size, SystemName, VolumeSerialNumber FROM Win32_LogicalDisk" +const wqlLogicalDisk = "SELECT Caption, CreationClassName, Description, DeviceID, FileSystem, FreeSpace, Name, Size, SystemName, VolumeName, VolumeSerialNumber FROM Win32_LogicalDisk" type win32LogicalDisk struct { Caption *string @@ -97,6 +97,7 @@ type win32LogicalDisk struct { Name *string Size *uint64 SystemName *string + VolumeName *string VolumeSerialNumber *string } @@ -175,7 +176,7 @@ func (i *Info) load() error { // Appending Partition p := &Partition{ Disk: disk, - Name: strings.TrimSpace(*logicaldisk.Caption), + Name: strings.TrimSpace(*logicaldisk.VolumeName), Label: strings.TrimSpace(*logicaldisk.Caption), SizeBytes: *logicaldisk.Size, MountPoint: *logicaldisk.DeviceID, diff --git a/vendor/github.com/jaypipes/ghw/pkg/pci/pci.go b/vendor/github.com/jaypipes/ghw/pkg/pci/pci.go index 2453597d733..4afdc3f61d9 100644 --- a/vendor/github.com/jaypipes/ghw/pkg/pci/pci.go +++ b/vendor/github.com/jaypipes/ghw/pkg/pci/pci.go @@ -36,6 +36,9 @@ type Device struct { // architecture is not NUMA. Node *topology.Node `json:"node,omitempty"` Driver string `json:"driver"` + // for IOMMU Groups see also: + // https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-iommu-deep-dive + IOMMUGroup string `json:"iommu_group"` } type devIdent struct { diff --git a/vendor/github.com/jaypipes/ghw/pkg/pci/pci_linux.go b/vendor/github.com/jaypipes/ghw/pkg/pci/pci_linux.go index 0bdf659d072..879df436dd9 100644 --- a/vendor/github.com/jaypipes/ghw/pkg/pci/pci_linux.go +++ b/vendor/github.com/jaypipes/ghw/pkg/pci/pci_linux.go @@ -95,6 +95,17 @@ func getDeviceNUMANode(ctx *context.Context, pciAddr *pciaddr.Address) *topology } } +func getDeviceIommuGroup(ctx *context.Context, pciAddr *pciaddr.Address) string { + paths := linuxpath.New(ctx) + iommuGroupPath := filepath.Join(paths.SysBusPciDevices, pciAddr.String(), "iommu_group") + + dest, err := os.Readlink(iommuGroupPath) + if err != nil { + return "" + } + return filepath.Base(dest) +} + func getDeviceDriver(ctx *context.Context, pciAddr *pciaddr.Address) string { paths := linuxpath.New(ctx) driverPath := filepath.Join(paths.SysBusPciDevices, pciAddr.String(), "driver") @@ -331,6 +342,7 @@ func (info *Info) GetDevice(address string) *Device { device.Node = getDeviceNUMANode(info.ctx, pciAddr) } device.Driver = getDeviceDriver(info.ctx, pciAddr) + device.IOMMUGroup = getDeviceIommuGroup(info.ctx, pciAddr) return device } diff --git a/vendor/github.com/jaypipes/ghw/pkg/snapshot/clonetree_pci_linux.go b/vendor/github.com/jaypipes/ghw/pkg/snapshot/clonetree_pci_linux.go index e7aa7d265de..0c2c68b3959 100644 --- a/vendor/github.com/jaypipes/ghw/pkg/snapshot/clonetree_pci_linux.go +++ b/vendor/github.com/jaypipes/ghw/pkg/snapshot/clonetree_pci_linux.go @@ -62,6 +62,7 @@ func scanPCIDeviceRoot(root string) (fileSpecs []string, pciRoots []string) { "class", "device", "driver", + "iommu_group", "irq", "local_cpulist", "modalias", diff --git a/vendor/modules.txt b/vendor/modules.txt index fce5a32ca59..645807763b2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -252,7 +252,7 @@ github.com/itchyny/gojq # github.com/itchyny/timefmt-go v0.1.6 ## explicit; go 1.20 github.com/itchyny/timefmt-go -# github.com/jaypipes/ghw v0.19.1 +# github.com/jaypipes/ghw v0.20.0 ## explicit; go 1.21 github.com/jaypipes/ghw github.com/jaypipes/ghw/pkg/accelerator