diff options
author | Pietro Cerutti <gahr@FreeBSD.org> | 2008-04-14 11:32:16 +0000 |
---|---|---|
committer | Pietro Cerutti <gahr@FreeBSD.org> | 2008-04-14 11:32:16 +0000 |
commit | eb40344528483c55565320e2b137fd7a6669be66 (patch) | |
tree | fa5c133157936da41546e49d6f326e136cadf5db /x11-wm | |
parent | Minor style change (diff) |
- Fix E-Cpu and E-Load on UP systems
PR: 122605
Submitted by: Daniel Holmes <danielh@holmesonics.com>
Approved by: miwi (mentor)
Notes
Notes:
svn path=/head/; revision=211240
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/epplets/Makefile | 1 | ||||
-rw-r--r-- | x11-wm/epplets/files/patch-epplets_E-Cpu.c | 4 | ||||
-rw-r--r-- | x11-wm/epplets/files/patch-epplets_E-Load.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/x11-wm/epplets/Makefile b/x11-wm/epplets/Makefile index 81a97f84ce88..2522a0558127 100644 --- a/x11-wm/epplets/Makefile +++ b/x11-wm/epplets/Makefile @@ -7,6 +7,7 @@ PORTNAME= epplets PORTVERSION= 0.10 +PORTREVISION= 1 CATEGORIES= x11-wm MASTER_SITES= SF MASTER_SITE_SUBDIR= enlightenment diff --git a/x11-wm/epplets/files/patch-epplets_E-Cpu.c b/x11-wm/epplets/files/patch-epplets_E-Cpu.c index 48eb13ee8948..7f4e597b8c7b 100644 --- a/x11-wm/epplets/files/patch-epplets_E-Cpu.c +++ b/x11-wm/epplets/files/patch-epplets_E-Cpu.c @@ -1,5 +1,5 @@ --- epplets/E-Cpu.c.orig 2007-03-16 20:52:25.000000000 +0100 -+++ epplets/E-Cpu.c 2008-01-24 13:40:28.000000000 +0100 ++++ epplets/E-Cpu.c 2008-04-14 13:14:07.000000000 +0200 @@ -1,3 +1,7 @@ +/* + * Copyright (C) 2008, Pietro Cerutti <gahr@FreeBSD.org> (FreeBSD adaptation) @@ -98,7 +98,7 @@ + + len = sizeof(cp_time); + -+ if(sysctlbyname("kern.cp_times", &cp_time, &len, NULL, 0)) { ++ if(sysctlbyname((cpus > 1) ? "kern.cp_times" : "kern.cp_time", &cp_time, &len, NULL, 0)) { + perror("Couldn't retrieve CPU states"); + exit(EXIT_FAILURE); + } diff --git a/x11-wm/epplets/files/patch-epplets_E-Load.c b/x11-wm/epplets/files/patch-epplets_E-Load.c index dbd32b29e01e..3263c9a08742 100644 --- a/x11-wm/epplets/files/patch-epplets_E-Load.c +++ b/x11-wm/epplets/files/patch-epplets_E-Load.c @@ -1,5 +1,5 @@ --- epplets/E-Load.c.orig 2006-04-16 00:32:42.000000000 +0200 -+++ epplets/E-Load.c 2008-01-24 00:20:59.000000000 +0100 ++++ epplets/E-Load.c 2008-04-14 13:14:29.000000000 +0200 @@ -8,6 +8,12 @@ #include "proc.h" #endif @@ -42,7 +42,7 @@ + long cp_time[cpus][CPUSTATES]; + size_t len = sizeof(cp_time); + -+ sysctlbyname("kern.cp_times", cp_time, &len, NULL, 0); ++ sysctlbyname((cpus > 1) ? "kern.cp_times" : "kern.cp_time", cp_time, &len, NULL, 0); + + for(i=0; i<cpus; i++) + { |