mirror of https://github.com/xzeldon/htop.git
Drop hideThreads Setting
It is only used to read process directories on RedHat beginning with a dot. Unconditionally accept directories with a starting dot.
This commit is contained in:
parent
9f67b95308
commit
ad72b747fa
1
Action.c
1
Action.c
|
@ -212,7 +212,6 @@ static Htop_Reaction actionToggleKernelThreads(State* st) {
|
||||||
|
|
||||||
static Htop_Reaction actionToggleUserlandThreads(State* st) {
|
static Htop_Reaction actionToggleUserlandThreads(State* st) {
|
||||||
st->settings->hideUserlandThreads = !st->settings->hideUserlandThreads;
|
st->settings->hideUserlandThreads = !st->settings->hideUserlandThreads;
|
||||||
st->settings->hideThreads = st->settings->hideUserlandThreads;
|
|
||||||
return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS;
|
return HTOP_RECALCULATE | HTOP_SAVE_SETTINGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,8 +141,6 @@ static bool Settings_read(Settings* this, const char* fileName, int initialCpuCo
|
||||||
this->direction = atoi(option[1]);
|
this->direction = atoi(option[1]);
|
||||||
} else if (String_eq(option[0], "tree_view")) {
|
} else if (String_eq(option[0], "tree_view")) {
|
||||||
this->treeView = atoi(option[1]);
|
this->treeView = atoi(option[1]);
|
||||||
} else if (String_eq(option[0], "hide_threads")) {
|
|
||||||
this->hideThreads = atoi(option[1]);
|
|
||||||
} else if (String_eq(option[0], "hide_kernel_threads")) {
|
} else if (String_eq(option[0], "hide_kernel_threads")) {
|
||||||
this->hideKernelThreads = atoi(option[1]);
|
this->hideKernelThreads = atoi(option[1]);
|
||||||
} else if (String_eq(option[0], "hide_userland_threads")) {
|
} else if (String_eq(option[0], "hide_userland_threads")) {
|
||||||
|
@ -259,7 +257,6 @@ bool Settings_write(Settings* this) {
|
||||||
// This "-1" is for compatibility with the older enum format.
|
// This "-1" is for compatibility with the older enum format.
|
||||||
fprintf(fd, "sort_key=%d\n", (int) this->sortKey - 1);
|
fprintf(fd, "sort_key=%d\n", (int) this->sortKey - 1);
|
||||||
fprintf(fd, "sort_direction=%d\n", (int) this->direction);
|
fprintf(fd, "sort_direction=%d\n", (int) this->direction);
|
||||||
fprintf(fd, "hide_threads=%d\n", (int) this->hideThreads);
|
|
||||||
fprintf(fd, "hide_kernel_threads=%d\n", (int) this->hideKernelThreads);
|
fprintf(fd, "hide_kernel_threads=%d\n", (int) this->hideKernelThreads);
|
||||||
fprintf(fd, "hide_userland_threads=%d\n", (int) this->hideUserlandThreads);
|
fprintf(fd, "hide_userland_threads=%d\n", (int) this->hideUserlandThreads);
|
||||||
fprintf(fd, "shadow_other_users=%d\n", (int) this->shadowOtherUsers);
|
fprintf(fd, "shadow_other_users=%d\n", (int) this->shadowOtherUsers);
|
||||||
|
@ -295,7 +292,6 @@ Settings* Settings_new(int initialCpuCount) {
|
||||||
|
|
||||||
this->sortKey = PERCENT_CPU;
|
this->sortKey = PERCENT_CPU;
|
||||||
this->direction = 1;
|
this->direction = 1;
|
||||||
this->hideThreads = false;
|
|
||||||
this->shadowOtherUsers = false;
|
this->shadowOtherUsers = false;
|
||||||
this->showThreadNames = false;
|
this->showThreadNames = false;
|
||||||
this->hideKernelThreads = false;
|
this->hideKernelThreads = false;
|
||||||
|
|
|
@ -40,7 +40,6 @@ typedef struct Settings_ {
|
||||||
bool showCPUFrequency;
|
bool showCPUFrequency;
|
||||||
bool treeView;
|
bool treeView;
|
||||||
bool showProgramPath;
|
bool showProgramPath;
|
||||||
bool hideThreads;
|
|
||||||
bool shadowOtherUsers;
|
bool shadowOtherUsers;
|
||||||
bool showThreadNames;
|
bool showThreadNames;
|
||||||
bool hideKernelThreads;
|
bool hideKernelThreads;
|
||||||
|
|
|
@ -985,7 +985,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
|
||||||
|
|
||||||
// The RedHat kernel hides threads with a dot.
|
// The RedHat kernel hides threads with a dot.
|
||||||
// I believe this is non-standard.
|
// I believe this is non-standard.
|
||||||
if ((!settings->hideThreads) && name[0] == '.') {
|
if (name[0] == '.') {
|
||||||
name++;
|
name++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue