Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:wbem
sblim-gather
0001-single-definition-of-globals.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-single-definition-of-globals.patch of Package sblim-gather
From 543e6e13a27fc0acfd2a986a0a409fcc5a9e019e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> Date: Fri, 9 Oct 2020 14:14:33 +0200 Subject: [PATCH] single definition of globals --- plugin/metricKvm.c | 1 + plugin/metricVirt.c | 3 ++- plugin/metricVirt.h | 4 ++-- plugin/metricXenV2.c | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin/metricKvm.c b/plugin/metricKvm.c index 779366670960..f85ad4f19504 100644 --- a/plugin/metricKvm.c +++ b/plugin/metricKvm.c @@ -34,6 +34,7 @@ // #define DEBUG #include "metricVirt.h" +extern struct domain_statistics_type domain_statistics; #include <mplugin.h> diff --git a/plugin/metricVirt.c b/plugin/metricVirt.c index cc77f4243d84..98ad326fcd13 100644 --- a/plugin/metricVirt.c +++ b/plugin/metricVirt.c @@ -21,7 +21,8 @@ // #define DEBUG #include "metricVirt.h" - +struct domain_statistics_type domain_statistics; +struct node_statistics_type node_statistics; #include <commutil.h> #include <mlog.h> diff --git a/plugin/metricVirt.h b/plugin/metricVirt.h index 4c69d0b9c181..7af635a3223b 100644 --- a/plugin/metricVirt.h +++ b/plugin/metricVirt.h @@ -48,7 +48,7 @@ struct node_statistics_type { size_t total_domains; unsigned long long total_memory; unsigned long long free_memory; -} node_statistics; +}; struct domain_statistics_type { unsigned int domain_id[MAX_DOMAINS]; @@ -61,7 +61,7 @@ struct domain_statistics_type { unsigned long long cpu_used[MAX_DOMAINS]; unsigned long long cpu_ready[MAX_DOMAINS]; struct vdisk_type * blkio[MAX_DOMAINS]; -} domain_statistics; +}; int testHypervisor(int type); diff --git a/plugin/metricXenV2.c b/plugin/metricXenV2.c index cebaad4079f0..deb56cbe3ea0 100644 --- a/plugin/metricXenV2.c +++ b/plugin/metricXenV2.c @@ -31,6 +31,7 @@ // #define DEBUG #include "metricVirt.h" +extern struct domain_statistics_type domain_statistics; #include <mplugin.h> -- 2.26.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor