bad print in hdparm.c

Alessandro Rubini rubini-list at gnudd.com
Wed May 20 13:58:26 UTC 2009


I said:

>> If needed a comment like:
>> 
>>       /* standby counts 5-second intervals */
>> 
>> would help better than changing the code.

Actually, the comment is already there, didn't notice it.

Walter Harms: 
> mmmh that would mean we need to multiply by 5 first to get [s] and then
> do a standby / 60, standby % 60 ;
> IMHO that would be better readable. Is this documented somewhere ?
> or do drives vary on that any way ?

I think it's "standard", for some meaning of the word. "man hdparm" on
my debian system spits out this:

          [...]              The encoding of the timeout value is somewhat
          peculiar.   A  value  of zero means "timeouts are disabled": the
          device will not automatically enter standby mode.  Values from 1
          to  240 specify multiples of 5 seconds, yielding timeouts from 5
          seconds to 20 minutes.  Values from 241 to 251 specify from 1 to
          11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5
          hours.  A value of 252 signifies a  timeout  of  21  minutes.  A
          value  of 253 sets a vendor-defined timeout period between 8 and
          12 hours, and the value 254 is reserved.  255 is interpreted  as
          21  minutes  plus  15  seconds.  Note that some older drives may
          have very different interpretations of these values.

/alessandro


More information about the busybox mailing list