Skip to content

Resume support for all sd* disk devices

Diangang Li requested to merge Diangang/hdparm:master into master

As reported in bug #787969[1], hdparm should only operate on disk devices, not partitions. The previous fix commit 0b2a7cfb ("d/hdparm.udev: don't trigger the udev rule on sd[a-z], closes: #787969") simply deleted the "" match, which limited detection to only the 26 disk devices (sda~sdz), inadvertently filtered out additional devices such as sdaa, sdab, etc. This commit restores support for all sd* disk devices by adding a device type check, ensuring that partitions (identified by numeric suffixes) are excluded. The same logic is applied to apm and spindown settings, enabling proper handling of sd* devices while filtering out partitions.

[1]. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787969

Merge request reports

Loading