]> granicus.if.org Git - procps-ng/commitdiff
library: reposition those 'info' structures in headers
authorJim Warner <james.warner@comcast.net>
Wed, 15 Dec 2021 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Thu, 16 Dec 2021 09:50:07 +0000 (20:50 +1100)
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 <james.warner@comcast.net>
proc/diskstats.h
proc/meminfo.h
proc/pids.h
proc/slabinfo.h
proc/stat.h
proc/vmstat.h

index d6f85105a45336000e58a4c626bbf931d1b22c53..ad2e224b8ccd234cad02d11c18a71cce5788c59a 100644 (file)
@@ -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);
index f6197faa8600a6622bc17ce440c98169950f2557..d60e263c4dd83328024f0d8858eb6b5a9bd2ec84 100644 (file)
@@ -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);
index 0a94d39640b2df6b1893c9befc044d5ef43b34e5..6d897d5d823fe90aecdf23e1210845c8390d055f 100644 (file)
@@ -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);
index 94064018461c2876741857276fa54aeca52950a6..2a28a01b2ae7ecc3d834c2b88240ad2eef104e0d 100644 (file)
@@ -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);
index 325ecd7ef89d3646a7de33b21c8447984dd5dde2..4de6e12995201801a733355d8cf66f595f7b0359 100644 (file)
@@ -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);
index 02c7650bfa0d6c709657978b79870a9942c21629..dd37e5425fc4c82c4f83e0ac1633e2562a7f98f3 100644 (file)
@@ -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);