diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-20 23:21:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-20 23:21:42 +0200 |
commit | 2b132e5139ab3cf437d2954a9a21204129e3778b (patch) | |
tree | 7bd60619e605f3c283659cbac50c0cf19a540f02 | |
parent | d8aeba4eed8de9491abcecce27391c5d04c4f77e (diff) | |
download | busybox-w32-2b132e5139ab3cf437d2954a9a21204129e3778b.tar.gz busybox-w32-2b132e5139ab3cf437d2954a9a21204129e3778b.tar.bz2 busybox-w32-2b132e5139ab3cf437d2954a9a21204129e3778b.zip |
hdparm: fix a thinko in a previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/hdparm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 7034778e7..0d374ca4a 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -1464,7 +1464,8 @@ static void interpret_standby(uint8_t standby) | |||
1464 | printf("off"); | 1464 | printf("off"); |
1465 | } else if (standby <= 240 || standby == 252 || standby == 255) { | 1465 | } else if (standby <= 240 || standby == 252 || standby == 255) { |
1466 | /* standby is in 5 sec units */ | 1466 | /* standby is in 5 sec units */ |
1467 | printf("%u minutes %u seconds", standby / (60/5), standby % (60/5)); | 1467 | unsigned t = standby * 5; |
1468 | printf("%u minutes %u seconds", t / 60, t % 60); | ||
1468 | } else if (standby <= 251) { | 1469 | } else if (standby <= 251) { |
1469 | unsigned t = (standby - 240); /* t is in 30 min units */; | 1470 | unsigned t = (standby - 240); /* t is in 30 min units */; |
1470 | printf("%u.%c hours", t / 2, (t & 1) ? '5' : '0'); | 1471 | printf("%u.%c hours", t / 2, (t & 1) ? '5' : '0'); |