Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#29 Command line processed in undocumented order

closed-fixed
nobody
None
5
2012-11-15
2009-12-19
Jon Niehof
No

The order in which command line options take effect appears to be hard-coded in process_dev, and not the order in which they are specified. Since this isn't documented in the man page, this can be confusing, e.g. the case of trying to set a spindown timeout and immediately going into suspend: hdparm -S60 -y /dev/whatever
The drive enters spindown from the -y, but then the -S60 takes effect and the drive is immediately spun back up.

(Original Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/221854\)

Discussion


  • Anonymous
    2012-11-15

    I hope that this get fixed by executing the command in the order as specified, or at least that hdparm parameter -y (standby mode) and -Y (sleep mode) are executed after other parameters. Otherwise drives to not spin down.

     
  • Mark Lord
    Mark Lord
    2012-11-15

    • status: open --> closed-fixed
     
  • Mark Lord
    Mark Lord
    2012-11-15

    The command order will remain undocumented, so if it is really important, then don't rely upon it.
    However, as of hdparm-9.43, the obvious "immediatel" power mode flags "idle, idle/unload, standby, sleep now all get executed at the end, after all others.

    Cheers