diff options
author | Daniel Lange <DLange@git.local> | 2024-01-28 17:08:21 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-01-28 17:08:21 +0100 |
commit | 431820011e5fa9df660bb02aee17cfa0b1b7d19d (patch) | |
tree | 474e4a9d79e47529696421d933dcf76765271364 | |
parent | 698a0cbff05fd41dac3b2fc448ad9c6a5c955025 (diff) | |
download | debian_htop-master.tar.gz debian_htop-master.tar.bz2 debian_htop-master.zip |
Apply upstream 71b099a as 004_fix_ktread_display.patchHEADdebian/3.3.0-4master
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/004_fix_ktread_display.patch | 37 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 45 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index cdf48fd..deb782b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +htop (3.3.0-4) unstable; urgency=medium + + * Apply upstream fix for broken Kernel Thread names when + the "Show Program Path" setting was disabled + + -- Daniel Lange <DLange@debian.org> Sun, 28 Jan 2024 17:08:00 +0100 + htop (3.3.0-3) unstable; urgency=medium * Apply upstream fix for broken tree mode sorting diff --git a/debian/patches/004_fix_ktread_display.patch b/debian/patches/004_fix_ktread_display.patch new file mode 100644 index 0000000..8fff974 --- /dev/null +++ b/debian/patches/004_fix_ktread_display.patch @@ -0,0 +1,37 @@ +From 71b099a8df9e8c2bf4361a9a93bebc409f513460 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com> +Date: Sat, 27 Jan 2024 23:22:31 +0100 +Subject: [PATCH] Disable basename matching for kernel threads + +Kernel threads are commonly not based on an executable and their cmdline +therefore just a human readable string. +On Linux this string might contain slashes, e.g. kworker/7:5H-ttm, which +cause Process_writeCommand() to print only the trailing parts if the +option *Show Program Path* is disabled. + +Reported-and-Suggested-By: mmrmaximuzz +--- + Process.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Process.c b/Process.c +index 1497503f0..9179c0eaf 100644 +--- a/Process.c ++++ b/Process.c +@@ -1038,8 +1038,14 @@ void Process_updateCmdline(Process* this, const char* cmdline, int basenameStart + + free(this->cmdline); + this->cmdline = cmdline ? xStrdup(cmdline) : NULL; +- this->cmdlineBasenameStart = (basenameStart || !cmdline) ? basenameStart : skipPotentialPath(cmdline, basenameEnd); +- this->cmdlineBasenameEnd = basenameEnd; ++ if (Process_isKernelThread(this)) { ++ /* kernel threads have no basename */ ++ this->cmdlineBasenameStart = 0; ++ this->cmdlineBasenameEnd = 0; ++ } else { ++ this->cmdlineBasenameStart = (basenameStart || !cmdline) ? basenameStart : skipPotentialPath(cmdline, basenameEnd); ++ this->cmdlineBasenameEnd = basenameEnd; ++ } + + this->mergedCommand.lastUpdate = 0; + } diff --git a/debian/patches/series b/debian/patches/series index 5b9b194..80c3f36 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 001_fix_number_of_running_tasks.patch 002_fix_tree_mode_sorting.patch 003_fix_column_header_update.patch +004_fix_ktread_display.patch |