Skip to content

feat: expose Vendor on DeviceProperties#159

Open
rothgar wants to merge 1 commit into
siderolabs:v2from
rothgar:add-vendor-property
Open

feat: expose Vendor on DeviceProperties#159
rothgar wants to merge 1 commit into
siderolabs:v2from
rothgar:add-vendor-property

Conversation

@rothgar

@rothgar rothgar commented Jun 10, 2026

Copy link
Copy Markdown
Member

Read /sys/block//device/vendor and surface it as DeviceProperties.Vendor. Populated for SCSI/SAS disks (real SCSI subsystem) and reported as "ATA" for SATA disks (libata convention). Empty for NVMe, which does not expose a vendor string at this path

Read /sys/block/<dev>/device/vendor and surface it as
DeviceProperties.Vendor. Populated for SCSI/SAS disks (real SCSI
subsystem) and reported as "ATA" for SATA disks (libata convention).
Empty for NVMe, which does not expose a vendor string at this path

Signed-off-by: Justin Garrison <justin.garrison@siderolabs.com>
Copilot AI review requested due to automatic review settings June 10, 2026 19:39
@github-project-automation github-project-automation Bot moved this to To Do in Planning Jun 10, 2026
@talos-bot talos-bot moved this from To Do to In Review in Planning Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes a device vendor string via DeviceProperties.Vendor, sourced from Linux sysfs (/sys/block/<dev>/device/vendor), to surface vendor info for SCSI/SAS devices and the libata-reported "ATA" vendor value for SATA devices.

Changes:

  • Add Vendor to the public DeviceProperties struct.
  • Populate DeviceProperties.Vendor in Linux GetProperties() by reading device/vendor from sysfs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
block/device.go Extends DeviceProperties with a new Vendor field.
block/device_linux.go Reads and assigns sysfs device/vendor into DeviceProperties.Vendor in GetProperties().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread block/device.go
Comment on lines 46 to 50
// Model from /sys/block/*/device/model.
Model string
// Vendor from /sys/block/<dev>/device/vendor.
Vendor string
// Serial /sys/block/<dev>/device/serial.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants