From b2c4fcfddbb12ea3820106413df50c24732cc8d2 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 15 Dec 2021 00:00:00 -0600 Subject: [PATCH] library: reposition those 'info' structures in headers For some unknown reason all the 'info' structures were declared between macros and function prototypes rather than right after all the other structure declarations. Signed-off-by: Jim Warner --- proc/diskstats.h | 4 ++-- proc/meminfo.h | 4 ++-- proc/pids.h | 4 ++-- proc/slabinfo.h | 4 ++-- proc/stat.h | 4 ++-- proc/vmstat.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/proc/diskstats.h b/proc/diskstats.h index d6f85105..ad2e224b 100644 --- a/proc/diskstats.h +++ b/proc/diskstats.h @@ -86,6 +86,8 @@ struct diskstats_reaped { struct diskstats_stack **stacks; }; +struct diskstats_info; + #define DISKSTATS_TYPE_DISK -11111 #define DISKSTATS_TYPE_PARTITION -22222 @@ -98,8 +100,6 @@ struct diskstats_reaped { stack -> head [ relative_enum ] . result . type -struct diskstats_info; - int procps_diskstats_new (struct diskstats_info **info); int procps_diskstats_ref (struct diskstats_info *info); int procps_diskstats_unref (struct diskstats_info **info); diff --git a/proc/meminfo.h b/proc/meminfo.h index f6197faa..d60e263c 100644 --- a/proc/meminfo.h +++ b/proc/meminfo.h @@ -182,6 +182,8 @@ struct meminfo_stack { struct meminfo_result *head; }; +struct meminfo_info; + #define MEMINFO_GET( info, actual_enum, type ) ( { \ struct meminfo_result *r = procps_meminfo_get( info, actual_enum ); \ @@ -191,8 +193,6 @@ struct meminfo_stack { stack -> head [ relative_enum ] . result . type -struct meminfo_info; - int procps_meminfo_new (struct meminfo_info **info); int procps_meminfo_ref (struct meminfo_info *info); int procps_meminfo_unref (struct meminfo_info **info); diff --git a/proc/pids.h b/proc/pids.h index 0a94d396..6d897d5d 100644 --- a/proc/pids.h +++ b/proc/pids.h @@ -228,13 +228,13 @@ struct pids_fetch { struct pids_stack **stacks; }; +struct pids_info; + #define PIDS_VAL( relative_enum, type, stack, info ) \ stack -> head [ relative_enum ] . result . type -struct pids_info; - int procps_pids_new (struct pids_info **info, enum pids_item *items, int numitems); int procps_pids_ref (struct pids_info *info); int procps_pids_unref (struct pids_info **info); diff --git a/proc/slabinfo.h b/proc/slabinfo.h index 94064018..2a28a01b 100644 --- a/proc/slabinfo.h +++ b/proc/slabinfo.h @@ -95,6 +95,8 @@ struct slabinfo_reaped { struct slabinfo_stack **stacks; }; +struct slabinfo_info; + #define SLABINFO_GET( info, actual_enum, type ) ( { \ struct slabinfo_result *r = procps_slabinfo_get( info, actual_enum ); \ @@ -104,8 +106,6 @@ struct slabinfo_reaped { stack -> head [ relative_enum ] . result . type -struct slabinfo_info; - int procps_slabinfo_new (struct slabinfo_info **info); int procps_slabinfo_ref (struct slabinfo_info *info); int procps_slabinfo_unref (struct slabinfo_info **info); diff --git a/proc/stat.h b/proc/stat.h index 325ecd7e..4de6e129 100644 --- a/proc/stat.h +++ b/proc/stat.h @@ -119,6 +119,8 @@ struct stat_reaped { struct stat_reap *numa; }; +struct stat_info; + // STAT_TIC_ID value for /proc/stat cpu summary #define STAT_SUMMARY_ID -11111 @@ -135,8 +137,6 @@ struct stat_reaped { stack -> head [ relative_enum ] . result . type -struct stat_info; - int procps_stat_new (struct stat_info **info); int procps_stat_ref (struct stat_info *info); int procps_stat_unref (struct stat_info **info); diff --git a/proc/vmstat.h b/proc/vmstat.h index 02c7650b..dd37e542 100644 --- a/proc/vmstat.h +++ b/proc/vmstat.h @@ -351,6 +351,8 @@ struct vmstat_stack { struct vmstat_result *head; }; +struct vmstat_info; + #define VMSTAT_GET( info, actual_enum, type ) ( { \ struct vmstat_result *r = procps_vmstat_get( info, actual_enum ); \ @@ -360,8 +362,6 @@ struct vmstat_stack { stack -> head [ relative_enum ] . result . type -struct vmstat_info; - int procps_vmstat_new (struct vmstat_info **info); int procps_vmstat_ref (struct vmstat_info *info); int procps_vmstat_unref (struct vmstat_info **info);