From: | "Amadeusz Zolnowski (aidecoe)" <aidecoe@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-admin/hddtemp/files: hddtemp-0.3_beta15-dontwake.patch |
Date: | Tue, 31 Jul 2012 10:40:24 |
Message-Id: | 20120731104009.48E1E2004C@flycatcher.gentoo.org |
1 | aidecoe 12/07/31 10:40:09 |
2 | |
3 | Added: hddtemp-0.3_beta15-dontwake.patch |
4 | Log: |
5 | Moved rev. with network-cron to r20 and applied fix for bug #424417 in r21. |
6 | Thanks to Martin Jürgens <martin.accounts@×××.de> for finding the report and |
7 | the patch. The patch has been written by Eduard Bloch <blade@××××××.org>, see |
8 | <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479840>. |
9 | |
10 | (Portage version: 2.1.11.9/cvs/Linux x86_64) |
11 | |
12 | Revision Changes Path |
13 | 1.1 app-admin/hddtemp/files/hddtemp-0.3_beta15-dontwake.patch |
14 | |
15 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/files/hddtemp-0.3_beta15-dontwake.patch?rev=1.1&view=markup |
16 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/hddtemp/files/hddtemp-0.3_beta15-dontwake.patch?rev=1.1&content-type=text/plain |
17 | |
18 | Index: hddtemp-0.3_beta15-dontwake.patch |
19 | =================================================================== |
20 | --- hddtemp-0.3-beta15/src/sata.c 2012-07-01 16:35:01.681708074 +0200 |
21 | +++ hddtemp-0.3-beta15/src/sata.c 2012-07-01 16:33:58.172109699 +0200 |
22 | @@ -125,6 +125,17 @@ |
23 | dsk->fd = -1; |
24 | return GETTEMP_NOSENSOR; |
25 | } |
26 | + |
27 | + switch(ata_get_powermode(dsk->fd)) { |
28 | + case PWM_STANDBY: |
29 | + case PWM_SLEEPING: |
30 | + if (!wakeup) |
31 | + return GETTEMP_DRIVE_SLEEP; |
32 | + case PWM_UNKNOWN: |
33 | + case PWM_ACTIVE: /* active or idle */ |
34 | + default: |
35 | + break; |
36 | + } |
37 | |
38 | /* get SMART values */ |
39 | if(sata_enable_smart(dsk->fd) != 0) { |