jaypipes / ghw

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

Change udev properties for Linux disk serial #353

Closed avishayt closed 11 months ago

avishayt commented 11 months ago

The properties that are currently used are not always accurate, for example we have seen that they sometimes contain the WWN and not the serial. This change uses SCSI_IDENT_SERIAL and ID_SCSI_SERIAL first. This behavior aligns with what lsblk does: https://github.com/util-linux/util-linux/blob/36c52fd14b83e6f7eff9a565c426a1e21812403b/misc-utils/lsblk-properties.c#L122-L128

jaypipes commented 11 months ago

Hi @avishayt! Thanks very much for this contribution! Would you mind signing the commit in order for the DCO check to succeed? I'll be reviewing the PR shortly.

avishayt commented 11 months ago

Thanks! Done.

avishayt commented 11 months ago

/retest

jaypipes commented 11 months ago

looks like there's some transient GH actions runner issues. Gonna wait a little while and retrigger. should be fine after.

jaypipes commented 11 months ago

@avishayt the CI failures are due to StepSecurity GH Actions checkers not allowing egress to proxy.golang.org. Nothing to do with your PR. Thanks much for your contribution! :)