summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2021-12-15 00:00:00 -0600
committerCraig Small <csmall@dropbear.xyz>2021-12-16 20:50:07 +1100
commitb2c4fcfddbb12ea3820106413df50c24732cc8d2 (patch)
treeb316b54d3b3cf82079b6a6cde67ae0bc4158a3f4
parent957b74292f8a77595bc2c7b451e2451337b9553a (diff)
downloadprocps-ng-b2c4fcfddbb12ea3820106413df50c24732cc8d2.tar.gz
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 <james.warner@comcast.net>
-rw-r--r--proc/diskstats.h4
-rw-r--r--proc/meminfo.h4
-rw-r--r--proc/pids.h4
-rw-r--r--proc/slabinfo.h4
-rw-r--r--proc/stat.h4
-rw-r--r--proc/vmstat.h4
6 files changed, 12 insertions, 12 deletions
diff --git a/proc/diskstats.h b/proc/diskstats.h
index d6f8510..ad2e224 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 f6197fa..d60e263 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 0a94d39..6d897d5 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 9406401..2a28a01 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 325ecd7..4de6e12 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 02c7650..dd37e54 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);