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

Collapse All | Expand All

(-)Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	htop
8
PORTNAME=	htop
9
PORTVERSION=	1.0.1
9
PORTVERSION=	1.0.2
10
PORTREVISION=	2
11
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
12
MASTER_SITES=	SF
11
MASTER_SITES=	SF
13
12
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (htop-1.0.1.tar.gz) = 07db2cbe02835f9e186b9610ecc3beca330a5c9beadb3b6069dd0a10561506f2
1
SHA256 (htop-1.0.2.tar.gz) = ee60657b044ece0df096c053060df7abf3cce3a568ab34d260049e6a37ccd8a1
2
SIZE (htop-1.0.1.tar.gz) = 384683
2
SIZE (htop-1.0.2.tar.gz) = 388499
(-)files/patch-Process.c (+20 lines)
Line 0 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
(-)files/patch-Process.h (+16 lines)
Line 0 Link Here
1
--- Process.h.orig	2013-04-21 03:34:39.000000000 +0800
2
+++ Process.h	2013-04-21 03:34:49.000000000 +0800
3
@@ -179,11 +179,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
(-)files/patch-ProcessList.c (-6 / +17 lines)
Lines 1-5 Link Here
1
--- ProcessList.c.orig	2012-02-03 01:45:11.000000000 +0200
1
--- ProcessList.c.orig	2013-04-21 03:39:12.000000000 +0800
2
+++ ProcessList.c	2012-05-16 17:39:50.000000000 +0300
2
+++ ProcessList.c	2013-04-21 03:41:41.000000000 +0800
3
@@ -25,6 +25,19 @@
3
@@ -25,6 +25,19 @@
4
 #include <time.h>
4
 #include <time.h>
5
 #include <assert.h>
5
 #include <assert.h>
Lines 20-26 Link Here
20
 /*{
20
 /*{
21
 #include "Vector.h"
21
 #include "Vector.h"
22
 #include "Hashtable.h"
22
 #include "Hashtable.h"
23
@@ -749,11 +762,13 @@
23
@@ -685,7 +698,7 @@
24
       unsigned long long int lasttimes = (process->utime + process->stime);
25
       if (! ProcessList_readStatFile(process, dirname, name, command))
26
          goto errorReadingProcess;
27
-      Process_updateIOPriority(process);
28
+//      Process_updateIOPriority(process);
29
       float percent_cpu = (process->utime + process->stime - lasttimes) / period * 100.0;
30
       process->percent_cpu = MAX(MIN(percent_cpu, cpus*100.0), 0.0);
31
       if (isnan(process->percent_cpu)) process->percent_cpu = 0.0;
32
@@ -764,13 +777,15 @@
24
 
33
 
25
 void ProcessList_scan(ProcessList* this) {
34
 void ProcessList_scan(ProcessList* this) {
26
    unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime, virtalltime;
35
    unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime, virtalltime;
Lines 32-43 Link Here
32
+   #ifndef __FreeBSD__
41
+   #ifndef __FreeBSD__
33
+   unsigned long long int swapFree = 0;
42
+   unsigned long long int swapFree = 0;
34
+   file = fopen(PROCMEMINFOFILE, "r");
43
+   file = fopen(PROCMEMINFOFILE, "r");
35
    assert(file != NULL);
44
    if (file == NULL) {
45
       CRT_fatalError("Cannot open " PROCMEMINFOFILE);
46
    }
36
-   int cpus = this->cpuCount;
47
-   int cpus = this->cpuCount;
37
    {
48
    {
38
       char buffer[128];
49
       char buffer[128];
39
       while (fgets(buffer, 128, file)) {
50
       while (fgets(buffer, 128, file)) {
40
@@ -788,6 +803,33 @@
51
@@ -805,6 +820,33 @@
41
    this->usedMem = this->totalMem - this->freeMem;
52
    this->usedMem = this->totalMem - this->freeMem;
42
    this->usedSwap = this->totalSwap - swapFree;
53
    this->usedSwap = this->totalSwap - swapFree;
43
    fclose(file);
54
    fclose(file);
Lines 70-73 Link Here
70
+   #endif
81
+   #endif
71
 
82
 
72
    file = fopen(PROCSTATFILE, "r");
83
    file = fopen(PROCSTATFILE, "r");
73
    assert(file != NULL);
84
    if (file == NULL) {
(-)files/patch-htop.c (+38 lines)
Line 0 Link Here
1
--- htop.c.orig	2012-10-05 07:55:31.000000000 +0800
2
+++ htop.c	2013-04-21 03:47:54.882373049 +0800
3
@@ -126,7 +126,7 @@
4
    mvaddstr(13, 0, "  Space: tag processes                      F: cursor follows process");
5
    mvaddstr(14, 0, "      U: untag all processes              + -: expand/collapse tree");
6
    mvaddstr(15, 0, "   F9 k: kill process/tagged processes  P M T: sort by CPU%, MEM% or TIME");
7
-   mvaddstr(16, 0, "   ] F7: higher priority (root only)        i: set IO priority");
8
+   mvaddstr(16, 0, "   ] F7: higher priority (root only)");
9
    mvaddstr(17, 0, "   [ F8: lower priority (+ nice)            I: invert sort order");
10
 #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
11
    if (pl->cpuCount > 1)
12
@@ -146,7 +146,7 @@
13
    mvaddstr(13, 0, "  Space"); mvaddstr(13,40, "    F");
14
    mvaddstr(14, 0, "      U"); mvaddstr(14,40, "  + -");
15
    mvaddstr(15, 0, "   F9 k"); mvaddstr(15,40, "P M T");
16
-   mvaddstr(16, 0, "   ] F7"); mvaddstr(16,40, "    i");
17
+   mvaddstr(16, 0, "   ] F7");
18
    mvaddstr(17, 0, "   [ F8"); mvaddstr(17,40, "    I");
19
                                mvaddstr(18,40, " F6 >");
20
 #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
21
@@ -850,7 +850,7 @@
22
          ((Object*)sortPanel)->delete((Object*)sortPanel);
23
          refreshTimeout = 0;
24
          break;
25
-      }
26
+      }/*
27
       case 'i':
28
       {
29
          Process* p = (Process*) Panel_getSelected(panel);
30
@@ -869,7 +869,7 @@
31
          ProcessList_printHeader(pl, Panel_getHeader(panel));
32
          refreshTimeout = 0;
33
          break;
34
-      }
35
+      }*/
36
       case 'I':
37
       {
38
          refreshTimeout = 0;

Return to bug 178010