mirror of https://github.com/xzeldon/htop.git
does not work within NGZ
This commit is contained in:
parent
131a6c6e2b
commit
423414937b
|
@ -25,6 +25,8 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
#define MAXCMDLINE 255
|
#define MAXCMDLINE 255
|
||||||
|
|
||||||
|
#define GZONE "global "
|
||||||
|
#define UZONE "unknown "
|
||||||
/*{
|
/*{
|
||||||
|
|
||||||
#include <kstat.h>
|
#include <kstat.h>
|
||||||
|
@ -62,12 +64,12 @@ typedef struct SolarisProcessList_ {
|
||||||
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc) {
|
char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc) {
|
||||||
char* zname;
|
char* zname;
|
||||||
if ( sproc->zoneid == 0 ) {
|
if ( sproc->zoneid == 0 ) {
|
||||||
zname = xStrdup("global ");
|
zname = xStrdup(GZONE);
|
||||||
} else if ( kd == NULL ) {
|
} else if ( kd == NULL ) {
|
||||||
zname = xStrdup("unknown ");
|
zname = xStrdup(UZONE);
|
||||||
} else {
|
} else {
|
||||||
kstat_t* ks = kstat_lookup( kd, "zones", sproc->zoneid, NULL );
|
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;
|
return zname;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ in the source distribution for its full text.
|
||||||
|
|
||||||
#define MAXCMDLINE 255
|
#define MAXCMDLINE 255
|
||||||
|
|
||||||
|
#define GZONE "global "
|
||||||
|
#define UZONE "unknown "
|
||||||
|
|
||||||
#include <kstat.h>
|
#include <kstat.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
Loading…
Reference in New Issue