FreeBSD Bugzilla – Attachment 168114 Details for
Bug 207957
[MAINTAINER] sysutils/htop: Update to 2.0.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-sysutils_htop.diff
patch-sysutils_htop.diff (text/plain), 6.33 KB, created by
Hung-Yi Chen
on 2016-03-13 21:49:07 UTC
(
hide
)
Description:
patch-sysutils_htop.diff
Filename:
MIME Type:
Creator:
Hung-Yi Chen
Created:
2016-03-13 21:49:07 UTC
Size:
6.33 KB
patch
obsolete
>Index: sysutils/htop/Makefile >=================================================================== >--- sysutils/htop/Makefile (revision 411032) >+++ sysutils/htop/Makefile (working copy) >@@ -2,13 +2,13 @@ > # $FreeBSD$ > > PORTNAME= htop >-PORTVERSION= 2.0.0 >-PORTREVISION= 2 >+PORTVERSION= 2.0.1 > CATEGORIES= sysutils > > MAINTAINER= gaod@hychen.org > COMMENT= Better top(1) - interactive process viewer > >+RUN_DEPENDS= lsof:${PORTSDIR}/sysutils/lsof > LICENSE= GPLv2 > > GNU_CONFIGURE= yes >Index: sysutils/htop/distinfo >=================================================================== >--- sysutils/htop/distinfo (revision 411032) >+++ sysutils/htop/distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (hishamhm-htop-2.0.0_GH0.tar.gz) = 2522a93792dfee188bfaff23f30332d1173460c95f9869588398e9bdd3a0491b >-SIZE (hishamhm-htop-2.0.0_GH0.tar.gz) = 143353 >+SHA256 (hishamhm-htop-2.0.1_GH0.tar.gz) = 636c1e8b703058e793e8d25423af4b74059290ef9e48fa261ba58555069517b5 >+SIZE (hishamhm-htop-2.0.1_GH0.tar.gz) = 145463 >Index: sysutils/htop/files/patch-CRT.c >=================================================================== >--- sysutils/htop/files/patch-CRT.c (nonexistent) >+++ sysutils/htop/files/patch-CRT.c (working copy) >@@ -0,0 +1,11 @@ >+--- CRT.c.orig 2016-03-14 05:29:57.249458000 +0800 >++++ CRT.c 2016-03-14 05:31:31.636109000 +0800 >+@@ -125,7 +125,7 @@ >+ >+ void CRT_handleSIGSEGV(int sgn); >+ >+-#define KEY_ALT(x) KEY_F(60) + (x - 'A') >++#define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) >+ >+ }*/ >+ > >Property changes on: sysutils/htop/files/patch-CRT.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/htop/files/patch-CRT.h >=================================================================== >--- sysutils/htop/files/patch-CRT.h (nonexistent) >+++ sysutils/htop/files/patch-CRT.h (working copy) >@@ -0,0 +1,11 @@ >+--- CRT.h.orig 2016-03-14 05:30:23.916821000 +0800 >++++ CRT.h 2016-03-14 05:31:43.642251000 +0800 >+@@ -115,7 +115,7 @@ >+ >+ void CRT_handleSIGSEGV(int sgn); >+ >+-#define KEY_ALT(x) KEY_F(60) + (x - 'A') >++#define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) >+ >+ >+ extern const char *CRT_treeStrAscii[TREE_STR_COUNT]; > >Property changes on: sysutils/htop/files/patch-CRT.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: sysutils/htop/files/patch-freebsd__Battery.c >=================================================================== >--- sysutils/htop/files/patch-freebsd__Battery.c (revision 411032) >+++ sysutils/htop/files/patch-freebsd__Battery.c (nonexistent) >@@ -1,27 +0,0 @@ >---- freebsd/Battery.c.orig 2016-02-13 00:30:03.804015000 +0800 >-+++ freebsd/Battery.c 2016-02-13 00:31:05.662396000 +0800 >-@@ -6,10 +6,21 @@ >- */ >- >- #include "BatteryMeter.h" >-+#include <sys/sysctl.h> >- >- void Battery_getData(double* level, ACPresence* isOnAC) { >-- // TODO >-- *level = -1; >-- *isOnAC = AC_ERROR; >-+ int life; >-+ size_t life_len = sizeof(life); >-+ if (sysctlbyname("hw.acpi.battery.life", &life, &life_len, NULL, 0) == -1) >-+ *level = -1; >-+ else >-+ *level = life; >-+ >-+ int acline; >-+ size_t acline_len = sizeof(acline); >-+ if (sysctlbyname("hw.acpi.acline", &acline, &acline_len, NULL, 0) == -1) >-+ *isOnAC = AC_ERROR; >-+ else >-+ *isOnAC = acline == 0 ? AC_ABSENT : AC_PRESENT; >- } >- > >Property changes on: sysutils/htop/files/patch-freebsd__Battery.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: sysutils/htop/files/patch-freebsd__FreeBSDProcessList.c >=================================================================== >--- sysutils/htop/files/patch-freebsd__FreeBSDProcessList.c (revision 411032) >+++ sysutils/htop/files/patch-freebsd__FreeBSDProcessList.c (nonexistent) >@@ -1,42 +0,0 @@ >---- freebsd/FreeBSDProcessList.c.orig 2016-02-10 12:48:39.000000000 -0800 >-+++ freebsd/FreeBSDProcessList.c 2016-02-13 13:42:40.759431578 -0800 >-@@ -84,6 +84,8 @@ >- static int MIB_kern_cp_times[2]; >- static int kernelFScale; >- >-+// XXX hack >-+static unsigned long long int Global_totalMem; >- >- ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) { >- FreeBSDProcessList* fpl = xCalloc(1, sizeof(FreeBSDProcessList)); >-@@ -301,6 +303,8 @@ >- //pl->totalMem *= pageSizeKb; >- sysctl(MIB_hw_physmem, 2, &(pl->totalMem), &len, NULL, 0); >- pl->totalMem /= 1024; >-+ // XXX hack >-+ Global_totalMem = pl->totalMem; >- >- sysctl(MIB_vm_stats_vm_v_active_count, 4, &(fpl->memActive), &len, NULL, 0); >- fpl->memActive *= pageSizeKb; >-@@ -477,8 +481,9 @@ >- } >- >- // from FreeBSD source /src/usr.bin/top/machine.c >-- proc->m_size = kproc->ki_size / 1024; >-- proc->m_resident = kproc->ki_rssize * pageSizeKb; >-+ proc->m_size = kproc->ki_size / 1024 / pageSizeKb; >-+ proc->m_resident = kproc->ki_rssize; >-+ proc->percent_mem = (proc->m_resident * PAGE_SIZE_KB) / (double)(Global_totalMem) * 100.0; >- proc->nlwp = kproc->ki_numthreads; >- proc->time = (kproc->ki_runtime + 5000) / 10000; >- >-@@ -487,9 +492,6 @@ >- // system idle process should own all CPU time left regardless of CPU count >- if ( strcmp("idle", kproc->ki_comm) == 0 ) { >- isIdleProcess = true; >-- } else { >-- if (cpus > 1) >-- proc->percent_cpu = proc->percent_cpu / (double) cpus; >- } >- } >- if (isIdleProcess == false && proc->percent_cpu >= 99.8) { > >Property changes on: sysutils/htop/files/patch-freebsd__FreeBSDProcessList.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
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 207957
: 168114