View | Details | Raw Unified | Return to bug 194738 | Differences between
and this patch

Collapse All | Expand All

(-)../../home/pi/myp/sysutils/htop/Makefile (-1 / +5 lines)
Lines 3-10 Link Here
3
3
4
PORTNAME=	htop
4
PORTNAME=	htop
5
PORTVERSION=	1.0.3
5
PORTVERSION=	1.0.3
6
DISTVERSIONPREFIX=v
6
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
7
MASTER_SITES=	http://hisham.hm/htop/releases/${PORTVERSION}/
8
8
9
MAINTAINER=	gaod@hychen.org
9
MAINTAINER=	gaod@hychen.org
10
COMMENT=	Better top(1) - interactive process viewer
10
COMMENT=	Better top(1) - interactive process viewer
Lines 22-27 Link Here
22
22
23
CONFIGURE_ARGS=	--with-proc=/compat/linux/proc --enable-unicode
23
CONFIGURE_ARGS=	--with-proc=/compat/linux/proc --enable-unicode
24
USES=		autoreconf ncurses libtool execinfo python:2,build
24
USES=		autoreconf ncurses libtool execinfo python:2,build
25
USE_GITHUB=	yes
26
GH_ACCOUNT=	hishamhm
27
GH_PROJECT=	htop
28
GH_TAGNAME=	21da044
25
29
26
LSOF_RUN_DEPENDS=	lsof:${PORTSDIR}/sysutils/lsof
30
LSOF_RUN_DEPENDS=	lsof:${PORTSDIR}/sysutils/lsof
27
31
(-)../../home/pi/myp/sysutils/htop/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (htop-1.0.3.tar.gz) = 055c57927f75847fdc222b5258b079a9542811a9dcf5421c615c7e17f55d1829
1
SHA256 (hishamhm-htop-v1.0.3-21da044_GH0.tar.gz) = f00e3b22fb657fa8f84fab9970ad6e3d9a29d716dfc953e0927bdf8335f711fb
2
SIZE (htop-1.0.3.tar.gz) = 399306
2
SIZE (hishamhm-htop-v1.0.3-21da044_GH0.tar.gz) = 142676
(-)../../home/pi/myp/sysutils/htop/files/patch-Process.c (-20 lines)
Lines 1-20 Link Here
1
--- Process.c.orig	2013-04-21 03:33:42.000000000 +0800
2
+++ Process.c	2013-04-21 03:34:27.000000000 +0800
3
@@ -602,7 +602,7 @@
4
 bool Process_changePriorityBy(Process* this, size_t delta) {
5
    return Process_setPriority(this, this->nice + delta);
6
 }
7
-
8
+/*
9
 IOPriority Process_updateIOPriority(Process* this) {
10
    IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->pid);
11
    this->ioPriority = ioprio;
12
@@ -613,7 +613,7 @@
13
    syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->pid, ioprio);
14
    return (Process_updateIOPriority(this) == ioprio);
15
 }
16
-
17
+*/
18
 /*
19
 [1] Note that before kernel 2.6.26 a process that has not asked for
20
 an io priority formally uses "none" as scheduling class, but the
(-)../../home/pi/myp/sysutils/htop/files/patch-Process.h (-16 lines)
Lines 1-16 Link Here
1
--- Process.h.orig	2014-10-19 02:06:35.000000000 +0800
2
+++ Process.h	2014-10-19 02:06:49.000000000 +0800
3
@@ -201,11 +201,11 @@
4
 bool Process_setPriority(Process* this, int priority);
5
 
6
 bool Process_changePriorityBy(Process* this, size_t delta);
7
-
8
+/*
9
 IOPriority Process_updateIOPriority(Process* this);
10
 
11
 bool Process_setIOPriority(Process* this, IOPriority ioprio);
12
-
13
+*/
14
 /*
15
 [1] Note that before kernel 2.6.26 a process that has not asked for
16
 an io priority formally uses "none" as scheduling class, but the
(-)../../home/pi/myp/sysutils/htop/files/patch-ProcessList.c (-11 lines)
Lines 1-11 Link Here
1
--- ProcessList.c.orig	2014-10-19 02:09:17.000000000 +0800
2
+++ ProcessList.c	2014-10-19 02:11:07.000000000 +0800
3
@@ -804,8 +804,6 @@
4
       unsigned long long int lasttimes = (process->utime + process->stime);
5
       if (! ProcessList_readStatFile(process, dirname, name, command))
6
          goto errorReadingProcess;
7
-      if (this->flags & PROCESS_FLAG_IOPRIO)
8
-         Process_updateIOPriority(process);
9
       float percent_cpu = (process->utime + process->stime - lasttimes) / period * 100.0;
10
       process->percent_cpu = MAX(MIN(percent_cpu, cpus*100.0), 0.0);
11
       if (isnan(process->percent_cpu)) process->percent_cpu = 0.0;
(-)../../home/pi/myp/sysutils/htop/files/patch-configure.ac (-16 lines)
Lines 1-16 Link Here
1
--- configure.ac.orig	2014-10-19 02:12:28.000000000 +0800
2
+++ configure.ac	2014-10-19 02:14:19.000000000 +0800
3
@@ -23,11 +23,12 @@
4
 
5
 # Checks for libraries.
6
 AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"])
7
+AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"])
8
 
9
 # Checks for header files.
10
 AC_HEADER_DIRENT
11
 AC_HEADER_STDC
12
-AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h],[:],[
13
+AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h kvm.h paths.h fcntl.h sys/sysctl.h],[:],[
14
   missing_headers="$missing_headers $ac_header"
15
 ])
16
 AC_CHECK_HEADERS([execinfo.h],[:],[:])
(-)../../home/pi/myp/sysutils/htop/files/patch-htop.c (-36 lines)
Lines 1-36 Link Here
1
--- htop.c.orig	2014-10-19 02:15:19.000000000 +0800
2
+++ htop.c	2014-10-19 02:17:10.000000000 +0800
3
@@ -96,7 +96,6 @@
4
 #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
5
    { .key = "      a: ", .info = "set CPU affinity" },
6
 #endif
7
-   { .key = "      i: ", .info = "set IO prority" },
8
    { .key = "      l: ", .info = "list open files with lsof" },
9
    { .key = "      s: ", .info = "trace syscalls with strace" },
10
    { .key = "         ", .info = "" },
11
@@ -856,25 +855,6 @@
12
          }
13
          break;
14
       }
15
-      case 'i':
16
-      {
17
-         Process* p = (Process*) Panel_getSelected(panel);
18
-         if (!p) break;
19
-         IOPriority ioprio = p->ioPriority;
20
-         Panel* ioprioPanel = IOPriorityPanel_new(ioprio);
21
-         const char* fuFunctions[] = {"Set    ", "Cancel ", NULL};
22
-         void* set = pickFromVector(panel, ioprioPanel, 21, headerHeight, fuFunctions, defaultBar, header);
23
-         if (set) {
24
-            IOPriority ioprio = IOPriorityPanel_getIOPriority(ioprioPanel);
25
-            bool ok = foreachProcess(panel, (ForeachProcessFn) Process_setIOPriority, (size_t) ioprio, NULL);
26
-            if (!ok)
27
-               beep();
28
-         }
29
-         Panel_delete((Object*)ioprioPanel);
30
-         ProcessList_printHeader(pl, Panel_getHeader(panel));
31
-         refreshTimeout = 0;
32
-         break;
33
-      }
34
       case 'I':
35
       {
36
          refreshTimeout = 0;

Return to bug 194738