aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene V. Lyubimkin <jackyf@debian.org>2013-10-05 13:17:13 +0300
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:33 +0200
commit51516557d375ac91e0a1a6f0525c3def1d3d79b0 (patch)
tree254a99114cb278716610e9bd10a5b526b9c8f261
parent479c126f77a2d3cc25bc69047c3e16315aa0c2a0 (diff)
downloaddebian_htop-51516557d375ac91e0a1a6f0525c3def1d3d79b0.tar.gz
debian_htop-51516557d375ac91e0a1a6f0525c3def1d3d79b0.tar.bz2
debian_htop-51516557d375ac91e0a1a6f0525c3def1d3d79b0.zip
Imported Debian patch 1.0.2-3debian/1.0.2-3
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/610-io-priority-only-on-linux.patch99
-rw-r--r--debian/patches/series1
3 files changed, 108 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 513ecdc..6ec6d3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+htop (1.0.2-3) unstable; urgency=low
+
+ * debian/patches:
+ - New patch 610-io-priority-only-on-linux.patch which should fix building
+ on non-Linux kernels.
+
+ -- Eugene V. Lyubimkin <jackyf@debian.org> Sat, 05 Oct 2013 13:17:13 +0300
+
htop (1.0.2-2) unstable; urgency=low
* Upload to unstable.
diff --git a/debian/patches/610-io-priority-only-on-linux.patch b/debian/patches/610-io-priority-only-on-linux.patch
new file mode 100644
index 0000000..12e29a9
--- /dev/null
+++ b/debian/patches/610-io-priority-only-on-linux.patch
@@ -0,0 +1,99 @@
+--- a/Process.c
++++ b/Process.c
+@@ -39,6 +39,10 @@ in the source distribution for its full text.
+ #endif
+ #define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K )
+
++#ifdef __linux
++#define HAVE_IO_PRIORITY
++#endif
++
+ /*{
+ #include "Object.h"
+ #include "Affinity.h"
+@@ -517,6 +521,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
+ #ifdef HAVE_CGROUP
+ case CGROUP: snprintf(buffer, n, "%-10s ", this->cgroup); break;
+ #endif
++ #ifdef HAVE_IO_PRIORITY
+ case IO_PRIORITY: {
+ int klass = IOPriority_class(this->ioPriority);
+ if (klass == IOPRIO_CLASS_NONE) {
+@@ -535,6 +540,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
+ }
+ break;
+ }
++ #endif
+ default:
+ snprintf(buffer, n, "- ");
+ }
+@@ -603,6 +609,7 @@ bool Process_changePriorityBy(Process* this, size_t delta) {
+ return Process_setPriority(this, this->nice + delta);
+ }
+
++#ifdef HAVE_IO_PRIORITY
+ IOPriority Process_updateIOPriority(Process* this) {
+ IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->pid);
+ this->ioPriority = ioprio;
+@@ -613,6 +620,7 @@ bool Process_setIOPriority(Process* this, IOPriority ioprio) {
+ syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->pid, ioprio);
+ return (Process_updateIOPriority(this) == ioprio);
+ }
++#endif
+
+ /*
+ [1] Note that before kernel 2.6.26 a process that has not asked for
+--- a/ProcessList.c
++++ b/ProcessList.c
+@@ -685,7 +685,9 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
+ unsigned long long int lasttimes = (process->utime + process->stime);
+ if (! ProcessList_readStatFile(process, dirname, name, command))
+ goto errorReadingProcess;
++ #ifdef HAVE_IO_PRIORITY
+ Process_updateIOPriority(process);
++ #endif
+ float percent_cpu = (process->utime + process->stime - lasttimes) / period * 100.0;
+ process->percent_cpu = MAX(MIN(percent_cpu, cpus*100.0), 0.0);
+ if (isnan(process->percent_cpu)) process->percent_cpu = 0.0;
+--- a/htop.c
++++ b/htop.c
+@@ -126,7 +126,11 @@ static void showHelp(ProcessList* pl) {
+ mvaddstr(13, 0, " Space: tag processes F: cursor follows process");
+ mvaddstr(14, 0, " U: untag all processes + -: expand/collapse tree");
+ mvaddstr(15, 0, " F9 k: kill process/tagged processes P M T: sort by CPU%, MEM% or TIME");
++#ifdef HAVE_IO_PRIORITY
+ mvaddstr(16, 0, " ] F7: higher priority (root only) i: set IO priority");
++#else
++ mvaddstr(16, 0, " ] F7: higher priority (root only)");
++#endif
+ mvaddstr(17, 0, " [ F8: lower priority (+ nice) I: invert sort order");
+ #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
+ if (pl->cpuCount > 1)
+@@ -146,7 +150,10 @@ static void showHelp(ProcessList* pl) {
+ mvaddstr(13, 0, " Space"); mvaddstr(13,40, " F");
+ mvaddstr(14, 0, " U"); mvaddstr(14,40, " + -");
+ mvaddstr(15, 0, " F9 k"); mvaddstr(15,40, "P M T");
+- mvaddstr(16, 0, " ] F7"); mvaddstr(16,40, " i");
++ mvaddstr(16, 0, " ] F7");
++#ifdef HAVE_IO_PRIORITY
++ mvaddstr(16,40, " i");
++#endif
+ mvaddstr(17, 0, " [ F8"); mvaddstr(17,40, " I");
+ mvaddstr(18,40, " F6 >");
+ #if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY)
+@@ -851,6 +858,7 @@ int main(int argc, char** argv) {
+ refreshTimeout = 0;
+ break;
+ }
++ #ifdef HAVE_IO_PRIORITY
+ case 'i':
+ {
+ Process* p = (Process*) Panel_getSelected(panel);
+@@ -870,6 +878,7 @@ int main(int argc, char** argv) {
+ refreshTimeout = 0;
+ break;
+ }
++ #endif
+ case 'I':
+ {
+ refreshTimeout = 0;
diff --git a/debian/patches/series b/debian/patches/series
index c8aa567..c366e92 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
600-openvz-veid-on-kernels-gt-2.6.18.patch
+610-io-priority-only-on-linux.patch
700-ltrace-support.patch

© 2014-2024 Faster IT GmbH | imprint | privacy policy