Rework enum ProcessField

Use only one enum instead of a global and a platform specific one.
Drop Platform_numberOfFields global variable.
Set known size of Process_fields array
This commit is contained in:
Christian Göttsche
2020-12-15 19:44:48 +01:00
committed by cgzones
parent d872e36308
commit 89473cc9ae
41 changed files with 208 additions and 175 deletions

View File

@ -13,18 +13,6 @@ in the source distribution for its full text.
#include <sys/proc.h>
#include <libproc.h>
typedef enum SolarisProcessField_ {
// Add platform-specific fields here, with ids >= 100
ZONEID = 100,
ZONE = 101,
PROJID = 102,
TASKID = 103,
POOLID = 104,
CONTID = 105,
LWPID = 106,
LAST_PROCESSFIELD = 107,
} SolarisProcessField;
typedef struct SolarisProcess_ {
Process super;
int kernel;
@ -46,7 +34,7 @@ typedef struct SolarisProcess_ {
extern const ProcessClass SolarisProcess_class;
extern ProcessFieldData Process_fields[];
extern ProcessFieldData Process_fields[LAST_PROCESSFIELD];
extern ProcessPidColumn Process_pidColumns[];