Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 335952 Details for
Bug 452730
x11-wm/icewm-1.3.7 suggested patches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Reads CPU temp from the correct file in /sys
icewm-1.3.7-cputemp.patch (text/plain), 1.30 KB, created by
Dag Bakke
on 2013-01-17 20:22:42 UTC
(
hide
)
Description:
Reads CPU temp from the correct file in /sys
Filename:
MIME Type:
Creator:
Dag Bakke
Created:
2013-01-17 20:22:42 UTC
Size:
1.30 KB
patch
obsolete
>diff -uprN a/src/acpustatus.cc b/src/acpustatus.cc >--- a/src/acpustatus.cc 2010-10-31 15:09:36.000000000 +0100 >+++ b/src/acpustatus.cc 2013-01-17 21:12:19.085715083 +0100 >@@ -315,6 +315,37 @@ int CPUStatus::getAcpiTemp(char *tempbuf > } > closedir(dir); > } >+ else if ((dir = opendir("/sys/class/thermal")) != NULL) { >+ struct dirent *de; >+ >+ while ((de = readdir(dir)) != NULL) { >+ >+ int fd, seglen; >+ >+ if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) >+ continue; >+ >+ sprintf(namebuf, "/sys/class/thermal/%s/temp", de->d_name); >+ fd = open(namebuf, O_RDONLY); >+ if (fd != -1) { >+ int len = read(fd, buf, sizeof(buf) - 1); >+ buf[len - 4] = '\0'; >+ seglen = strlen(buf) + 4; >+ if (retbuflen + seglen >= buflen) { >+ retbuflen = -retbuflen; >+ close(fd); >+ closedir(dir); >+ break; >+ } >+ retbuflen += seglen; >+ strcat(tempbuf, " "); >+ strncat(tempbuf, buf, seglen); >+ strcat(tempbuf, " C"); >+ close(fd); >+ } >+ } >+ closedir(dir); >+ } > return retbuflen; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 452730
:
335946
|
335948
| 335952 |
335954