Hi devs Not sure if I'm right here, but I guess the hdparm init script is a Gentoo extention. While hdparm now supports sdXX devices for some functions (such as the standby timer -S) and some drives (most notably SATA), the init script only handles entries like hdXX_args and skips sdXX_args. Could you add support for the latter - and maybe add a note to /etc/conf.d/hdparm mentioning that only few parameters are allowed for sdXX devices these days. Many thanks, -sven
Please, don't restrict bugs without a reason.
a note in conf.d wont really cut it ... it has to just kind of "work" out of the box for both PATA and SATA ...
The init script does not need to be cleverer than the hdparm tool itself - which will return a dumb "inappropriate ioctl for device". Cou can't keep users from adding illegal arguments to /etc/conf.d/hdparm anyway. Changing the line "for device in /dev/hd?" in /etc/init.d/hdparm so it also parses sdXX_args works just fine on my pretty standard SATA box.
Well, (In reply to comment #2) > a note in conf.d wont really cut it ... it has to just kind of "work" out of > the box for both PATA and SATA ... The only way I see you can do this is by looking in sysfs. There is a entry for storage.vendor which is set to ATA for sata drives. So something like: udevinfo -q env -n <scsi_device> | grep VENDOR should return ID_VENDOR=ATA. If not it is a normal scsi device.
you missed the point adding /dev/sd? to the default list results in an init.d script that, by default, causes ugly messages like: * Running hdparm on /dev/sda ... HDIO_SET_DMA failed: Inappropriate ioctl for device [ ok ] the code needs to just work by default
added basic support for pata_all_args and sata_all_args