From eb40344528483c55565320e2b137fd7a6669be66 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 14 Apr 2008 11:32:16 +0000 Subject: - Fix E-Cpu and E-Load on UP systems PR: 122605 Submitted by: Daniel Holmes Approved by: miwi (mentor) --- x11-wm/epplets/Makefile | 1 + x11-wm/epplets/files/patch-epplets_E-Cpu.c | 4 ++-- x11-wm/epplets/files/patch-epplets_E-Load.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'x11-wm/epplets') 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 (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