library: expand VAL macros to include the context parm
This patch will set the stage for validating the types referenced in the result union. For now, the parameter representing that 'info' structure will remain unused. [ and while we're at it, let us correct a faulty GET ] [ macro in the diskstats header. that puppy missed a ] [ parm which ain't so good if that guy is ever used! ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
51aef8f769
commit
6cafe3abec
@ -89,10 +89,10 @@ struct diskstats_reap {
|
|||||||
#define DISKSTATS_TYPE_DISK -11111
|
#define DISKSTATS_TYPE_DISK -11111
|
||||||
#define DISKSTATS_TYPE_PARTITION -22222
|
#define DISKSTATS_TYPE_PARTITION -22222
|
||||||
|
|
||||||
#define DISKSTATS_GET( info, actual_enum, type ) \
|
#define DISKSTATS_GET( info, name, actual_enum, type ) \
|
||||||
procps_diskstats_get( info, actual_enum ) -> result . type
|
procps_diskstats_get( info, name, actual_enum ) -> result . type
|
||||||
|
|
||||||
#define DISKSTATS_VAL( relative_enum, type, stack) \
|
#define DISKSTATS_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ struct meminfo_stack {
|
|||||||
#define MEMINFO_GET( info, actual_enum, type ) \
|
#define MEMINFO_GET( info, actual_enum, type ) \
|
||||||
procps_meminfo_get( info, actual_enum ) -> result . type
|
procps_meminfo_get( info, actual_enum ) -> result . type
|
||||||
|
|
||||||
#define MEMINFO_VAL( relative_enum, type, stack) \
|
#define MEMINFO_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ struct pids_fetch {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define PIDS_VAL( relative_enum, type, stack ) \
|
#define PIDS_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ struct slabinfo_reap {
|
|||||||
#define SLABINFO_GET( info, actual_enum, type ) \
|
#define SLABINFO_GET( info, actual_enum, type ) \
|
||||||
procps_slabinfo_get( info, actual_enum ) -> result . type
|
procps_slabinfo_get( info, actual_enum ) -> result . type
|
||||||
|
|
||||||
#define SLABINFO_VAL( relative_enum, type, stack ) \
|
#define SLABINFO_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ struct stat_reaped {
|
|||||||
#define STAT_GET( info, actual_enum, type ) \
|
#define STAT_GET( info, actual_enum, type ) \
|
||||||
procps_stat_get( info, actual_enum ) -> result . type
|
procps_stat_get( info, actual_enum ) -> result . type
|
||||||
|
|
||||||
#define STAT_VAL( relative_enum, type, stack ) \
|
#define STAT_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ struct vmstat_stack {
|
|||||||
#define VMSTAT_GET( info, actual_enum, type ) \
|
#define VMSTAT_GET( info, actual_enum, type ) \
|
||||||
procps_vmstat_get( info, actual_enum ) -> result . type
|
procps_vmstat_get( info, actual_enum ) -> result . type
|
||||||
|
|
||||||
#define VMSTAT_VAL( relative_enum, type, stack ) \
|
#define VMSTAT_VAL( relative_enum, type, stack, info ) \
|
||||||
stack -> head [ relative_enum ] . result . type
|
stack -> head [ relative_enum ] . result . type
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user