summaryrefslogtreecommitdiffstats
path: root/Action.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-11-11 22:15:35 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-14 15:51:26 +0100
commit18763051a2c5a5d3a39bfabc284b3d72b1f6fc9b (patch)
tree6674c47d7b011aca855ea72a0b94c7567bc28294 /Action.c
parent2d6da2e52066067e4c82a2e16f73438319e1db81 (diff)
Split platform dependent parts for file locks screen
Diffstat (limited to 'Action.c')
-rw-r--r--Action.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Action.c b/Action.c
index aa9614a5..ee5b9af8 100644
--- a/Action.c
+++ b/Action.c
@@ -27,6 +27,7 @@ in the source distribution for its full text.
#include "MainPanel.h"
#include "OpenFilesScreen.h"
#include "Process.h"
+#include "ProcessLocksScreen.h"
#include "ProvideCurses.h"
#include "ScreenManager.h"
#include "SignalsPanel.h"
@@ -34,10 +35,6 @@ in the source distribution for its full text.
#include "Vector.h"
#include "XUtils.h"
-#ifdef HTOP_LINUX
-#include "linux/ProcessLocksScreen.h"
-#endif
-
Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) {
Panel* panel = st->panel;
@@ -375,7 +372,6 @@ static Htop_Reaction actionLsof(State* st) {
return HTOP_REFRESH | HTOP_REDRAW_BAR;
}
-#ifdef HTOP_LINUX
static Htop_Reaction actionShowLocks(State* st) {
Process* p = (Process*) Panel_getSelected(st->panel);
if (!p) return HTOP_OK;
@@ -386,7 +382,6 @@ static Htop_Reaction actionShowLocks(State* st) {
CRT_enableDelay();
return HTOP_REFRESH | HTOP_REDRAW_BAR;
}
-#endif
static Htop_Reaction actionStrace(State* st) {
Process* p = (Process*) Panel_getSelected(st->panel);
@@ -452,9 +447,7 @@ static const struct { const char* key; const char* info; } helpRight[] = {
{ .key = " e: ", .info = "show process environment" },
{ .key = " i: ", .info = "set IO priority" },
{ .key = " l: ", .info = "list open files with lsof" },
-#ifdef HTOP_LINUX
{ .key = " x: ", .info = "list file locks of process" },
-#endif
{ .key = " s: ", .info = "trace syscalls with strace" },
{ .key = " w: ", .info = "wrap process command in multiple lines" },
{ .key = " F2 C S: ", .info = "setup" },
@@ -640,9 +633,7 @@ void Action_setBindings(Htop_Action* keys) {
keys['S'] = actionSetup;
keys['C'] = actionSetup;
keys[KEY_F(2)] = actionSetup;
-#ifdef HTOP_LINUX
keys['x'] = actionShowLocks;
-#endif
keys['l'] = actionLsof;
keys['s'] = actionStrace;
keys[' '] = actionTag;

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