diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2021-08-31 15:38:52 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-12-07 17:04:49 +1100 |
commit | 72ba20fa5f077bab4286dd78f9944df15de3b3b4 (patch) | |
tree | 0c4fb4e63b80b3a20d5f50bdac6bed9fe2bee607 /solaris | |
parent | ff4f44b22ae8d6522ee22599174a6cdd41bc0314 (diff) |
Introduce screen tabs
This is a forward port (by nathans) of Hisham's original code.
Diffstat (limited to 'solaris')
-rw-r--r-- | solaris/Platform.c | 12 | ||||
-rw-r--r-- | solaris/Platform.h | 6 | ||||
-rw-r--r-- | solaris/SolarisProcessList.c | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/solaris/Platform.c b/solaris/Platform.c index cdc79ae4..15917c94 100644 --- a/solaris/Platform.c +++ b/solaris/Platform.c @@ -40,6 +40,16 @@ in the source distribution for its full text. #include "SolarisProcessList.h" +ScreenDefaults Platform_defaultScreens[] = { + { + .name = "Default", + .columns = "PID LWPID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", + .sortKey = "PERCENT_CPU", + }, +}; + +const unsigned int Platform_numberOfDefaultScreens = ARRAYSIZE(Platform_defaultScreens); + const SignalItem Platform_signals[] = { { .name = " 0 Cancel", .number = 0 }, { .name = " 1 SIGHUP", .number = 1 }, @@ -87,8 +97,6 @@ const SignalItem Platform_signals[] = { const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals); -const ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; - const MeterClass* const Platform_meterTypes[] = { &CPUMeter_class, &ClockMeter_class, diff --git a/solaris/Platform.h b/solaris/Platform.h index b140788d..6bd8179b 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -52,12 +52,14 @@ typedef struct envAccum_ { char* env; } envAccum; +extern ScreenDefaults Platform_defaultScreens[]; + +extern const unsigned int Platform_numberOfDefaultScreens; + extern const SignalItem Platform_signals[]; extern const unsigned int Platform_numberOfSignals; -extern const ProcessField Platform_defaultFields[]; - extern const MeterClass* const Platform_meterTypes[]; bool Platform_init(void); diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c index 71e85fcb..3e006fcb 100644 --- a/solaris/SolarisProcessList.c +++ b/solaris/SolarisProcessList.c @@ -451,7 +451,7 @@ static int SolarisProcessList_walkproc(psinfo_t* _psinfo, lwpsinfo_t* _lwpsinfo, Process_updateComm(proc, _psinfo->pr_fname); Process_updateCmdline(proc, _psinfo->pr_psargs, 0, 0); - if (proc->settings->flags & PROCESS_FLAG_CWD) { + if (proc->settings->ss->flags & PROCESS_FLAG_CWD) { SolarisProcessList_updateCwd(_psinfo->pr_pid, proc); } } |