8000 Solaris 11 compatibility by senjan · Pull Request #914 · hishamhm/htop · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Action.c
10000
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static Htop_Reaction actionHelp(State* st) {
if (settings->detailedCPUTime) {
addattrstr(CRT_colors[CPU_NICE_TEXT], "low"); addstr("/");
addattrstr(CRT_colors[CPU_NORMAL], "normal"); addstr("/");
addattrstr(CRT_colors[CPU_KERNEL], "kernel"); addstr("/");
addattrstr(CRT_colors[CPU_KRNL], "kernel"); addstr("/");
addattrstr(CRT_colors[CPU_IRQ], "irq"); addstr("/");
addattrstr(CRT_colors[CPU_SOFTIRQ], "soft-irq"); addstr("/");
addattrstr(CRT_colors[CPU_STEAL], "steal"); addstr("/");
Expand All @@ -473,7 +473,7 @@ static Htop_Reaction actionHelp(State* st) {
} else {
addattrstr(CRT_colors[CPU_NICE_TEXT], "low-priority"); addstr("/");
addattrstr(CRT_colors[CPU_NORMAL], "normal"); addstr("/");
addattrstr(CRT_colors[CPU_KERNEL], "kernel"); addstr("/");
addattrstr(CRT_colors[CPU_KRNL], "kernel"); addstr("/");
addattrstr(CRT_colors[CPU_GUEST], "virtualiz");
addattrstr(CRT_colors[BAR_SHADOW], " used%");
}
Expand Down
6 changes: 3 additions & 3 deletions CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef enum {
}*/

int CPUMeter_attributes[] = {
CPU_NICE, CPU_NORMAL, CPU_KERNEL, CPU_IRQ, CPU_SOFTIRQ, CPU_STEAL, CPU_GUEST, CPU_IOWAIT
CPU_NICE, CPU_NORMAL, CPU_KRNL, CPU_IRQ, CPU_SOFTIRQ, CPU_STEAL, CPU_GUEST, CPU_IOWAIT
};

#ifndef MIN
Expand Down Expand Up @@ -80,7 +80,7 @@ static void CPUMeter_display(Object* cast, RichString* out) {
if (this->pl->settings->detailedCPUTime) {
xSnprintf(buffer, sizeof(buffer), "%5.1f%% ", this->values[CPU_METER_KERNEL]);
RichString_append(out, CRT_colors[METER_TEXT], "sy:");
RichString_append(out, CRT_colors[CPU_KERNEL], buffer);
RichString_append(out, CRT_colors[CPU_KRNL], buffer);
xSnprintf(buffer, sizeof(buffer), "%5.1f%% ", this->values[CPU_METER_NICE]);
RichString_append(out, CRT_colors[METER_TEXT], "ni:");
RichString_append(out, CRT_colors[CPU_NICE_TEXT], buffer);
Expand All @@ -106,7 +106,7 @@ static void CPUMeter_display(Object* cast, RichString* out) {
} else {
xSnprintf(buffer, sizeof(buffer), "%5.1f%% ", this->values[CPU_METER_KERNEL]);
RichString_append(out, CRT_colors[METER_TEXT], "sys:");
RichString_append(out, CRT_colors[CPU_KERNEL], buffer);
RichString_append(out, CRT_colors[CPU_KRNL], buffer);
xSnprintf(buffer, sizeof(buffer), "%5.1f%% ", this->values[CPU_METER_NICE]);
RichString_append(out, CRT_colors[METER_TEXT], "low:");
RichString_append(out, CRT_colors[CPU_NICE_TEXT], buffer);
Expand Down
14 changes: 7 additions & 7 deletions CRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef enum ColorElements_ {
CPU_NICE,
CPU_NICE_TEXT,
CPU_NORMAL,
CPU_KERNEL,
CPU_KRNL,
CPU_IOWAIT,
CPU_IRQ,
CPU_SOFTIRQ,
Expand Down Expand Up @@ -226,7 +226,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = ColorPair(Blue,Black),
[CPU_NICE_TEXT] = A_BOLD | ColorPair(Blue,Black),
[CPU_NORMAL] = ColorPair(Green,Black),
[CPU_KERNEL] = ColorPair(Red,Black),
[CPU_KRNL] = ColorPair(Red,Black),
[CPU_IOWAIT] = A_BOLD | ColorPair(Black, Black),
[CPU_IRQ] = ColorPair(Yellow,Black),
[CPU_SOFTIRQ] = ColorPair(Magenta,Black),
Expand Down Expand Up @@ -285,7 +285,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = A_NORMAL,
[CPU_NICE_TEXT] = A_NORMAL,
[CPU_NORMAL] = A_BOLD,
[CPU_KERNEL] = A_BOLD,
[CPU_KRNL] = A_BOLD,
[CPU_IOWAIT] = A_NORMAL,
[CPU_IRQ] = A_BOLD,
[CPU_SOFTIRQ] = A_BOLD,
Expand Down Expand Up @@ -344,7 +344,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = ColorPair(Cyan,White),
[CPU_NICE_TEXT] = ColorPair(Cyan,White),
[CPU_NORMAL] = ColorPair(Green,White),
[CPU_KERNEL] = ColorPair(Red,White),
[CPU_KRNL] = ColorPair(Red,White),
[CPU_IOWAIT] = A_BOLD | ColorPair(Black, White),
[CPU_IRQ] = ColorPair(Blue,White),
[CPU_SOFTIRQ] = ColorPair(Blue,White),
Expand Down Expand Up @@ -403,7 +403,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = ColorPair(Cyan,Black),
[CPU_NICE_TEXT] = ColorPair(Cyan,Black),
[CPU_NORMAL] = ColorPair(Green,Black),
[CPU_KERNEL] = ColorPair(Red,Black),
[CPU_KRNL] = ColorPair(Red,Black),
[CPU_IOWAIT] = A_BOLD | ColorPair(Black, Black),
[CPU_IRQ] = A_BOLD | ColorPair(Blue,Black),
[CPU_SOFTIRQ] = ColorPair(Blue,Black),
Expand Down Expand Up @@ -462,7 +462,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = A_BOLD | ColorPair(Cyan,Blue),
[CPU_NICE_TEXT] = A_BOLD | ColorPair(Cyan,Blue),
[CPU_NORMAL] = A_BOLD | ColorPair(Green,Blue),
[CPU_KERNEL] = A_BOLD | ColorPair(Red,Blue),
[CPU_KRNL] = A_BOLD | ColorPair(Red,Blue),
[CPU_IOWAIT] = A_BOLD | ColorPair(Blue,Blue),
[CPU_IRQ] = A_BOLD | ColorPair(Black,Blue),
[CPU_SOFTIRQ] = ColorPair(Black,Blue),
Expand Down Expand Up @@ -521,7 +521,7 @@ int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
[CPU_NICE] = ColorPair(Blue,Black),
[CPU_NICE_TEXT] = A_BOLD | ColorPair(Blue,Black),
[CPU_NORMAL] = ColorPair(Green,Black),
[CPU_KERNEL] = ColorPair(Red,Black),
[CPU_KRNL] = ColorPair(Red,Black),
[CPU_IOWAIT] = ColorPair(Yellow,Black),
[CPU_IRQ] = A_BOLD | ColorPair(Blue,Black),
[CPU_SOFTIRQ] = ColorPair(Blue,Black),
Expand Down
2 changes: 1 addition & 1 deletion CRT.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ typedef enum ColorElements_ {
CPU_NICE,
CPU_NICE_TEXT,
CPU_NORMAL,
CPU_KERNEL,
CPU_KRNL,
CPU_IOWAIT,
CPU_IRQ,
CPU_SOFTIRQ,
Expand Down
2 changes: 1 addition & 1 deletion TasksMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in the source distribution for its full text.
}*/

int TasksMeter_attributes[] = {
CPU_KERNEL, PROCESS_THREAD, PROCESS, TASKS_RUNNING
CPU_KRNL, PROCESS_THREAD, PROCESS, TASKS_RUNNING
};

static void TasksMeter_updateValues(Meter* this, char* buffer, int len) {
Expand Down
8 changes: 5 additions & 3 deletions solaris/SolarisProcessList.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ in the source distribution for its full text.

#define MAXCMDLINE 255

#define GZONE "global "
#define UZONE "unknown "
/*{

#include <kstat.h>
Expand Down Expand Up @@ -62,12 +64,12 @@ typedef struct SolarisProcessList_ {
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc) {
char* zname;
if ( sproc->zoneid == 0 ) {
zname = xStrdup("global ");
zname = xStrdup(GZONE);
} else if ( kd == NULL ) {
zname = xStrdup("unknown ");
zname = xStrdup(UZONE);
} else {
kstat_t* ks = kstat_lookup( kd, "zones", sproc->zoneid, NULL );
zname = xStrdup(ks->ks_name);
zname = xStrdup(ks == NULL ? UZONE : ks->ks_name);
}
return zname;
}
Expand Down
2 changes: 2 additions & 0 deletions solaris/SolarisProcessList.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in the source distribution for its full text.

#define MAXCMDLINE 255

#define GZONE "global "
#define UZONE "unknown "

#include <kstat.h>
#include <sys/param.h>
Expand Down
0