From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686) The hdparm command, using options to probe a drive, will exit 0 as if the probe was successful but the output says otherwise. Reproducible: Always Steps to Reproduce: 1.hdparm -C /dev/hdc where /dev/hdc is a drive that is working that you want to obtain the status 2.put the drive to sleep: hdparm -Y /dev/hdc 3.pull the power plug on /dev/hdc 4.hdparm -C /dev/hdc 5.echo $? Actual Results: # hdparm -C /dev/hdd /dev/hdd: drive state is: unknown # echo $? 0 Expected Results: # hdparm -C /dev/hdd /dev/hdd: drive state is: unknown # echo $? 1 (or some other non-zero exit code) Other hdparm commands such as: # hdparm -Y /dev/hdd /dev/hdd: issuing sleep command HDIO_DRIVE_CMD(sleep) failed: Input/output error # echo $? 0 also exit 0 when an error occurs.
Most of these are warnings. The exit status is only set if hdparm can't proceed because of invalid input.