|
|
c563b9 |
From cd098b06db263cfb337d4b8eaf2724df66fff060 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Fri, 20 Nov 2020 14:00:36 -0500
|
|
|
c563b9 |
Subject: [PATCH 1/9] Fix: libs, tools: Be consistent with GListPtr and
|
|
|
c563b9 |
xmlNodePtr in formatted output.
|
|
|
c563b9 |
|
|
|
c563b9 |
GListPtr should be removed from all the formatted output messages. It
|
|
|
c563b9 |
seems like a GLib type, but it's not. So that's weird and we should
|
|
|
c563b9 |
stop spreading uses of it around.
|
|
|
c563b9 |
|
|
|
c563b9 |
On the other hand, xmlNodePtr is a libxml type that we are already using
|
|
|
c563b9 |
sporadically. We should be more consistent in using it.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/fencing/st_output.c | 20 ++++++------
|
|
|
c563b9 |
lib/pacemaker/pcmk_output.c | 36 ++++++++++-----------
|
|
|
c563b9 |
lib/pengine/bundle.c | 18 +++++------
|
|
|
c563b9 |
lib/pengine/clone.c | 44 +++++++++++++-------------
|
|
|
c563b9 |
lib/pengine/group.c | 28 ++++++++---------
|
|
|
c563b9 |
lib/pengine/native.c | 20 ++++++------
|
|
|
c563b9 |
lib/pengine/pe_output.c | 76 ++++++++++++++++++++++-----------------------
|
|
|
c563b9 |
tools/crm_resource_print.c | 64 +++++++++++++++++++-------------------
|
|
|
c563b9 |
8 files changed, 153 insertions(+), 153 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/fencing/st_output.c b/lib/fencing/st_output.c
|
|
|
c563b9 |
index 04f4b83..7c3ccef 100644
|
|
|
c563b9 |
--- a/lib/fencing/st_output.c
|
|
|
c563b9 |
+++ b/lib/fencing/st_output.c
|
|
|
c563b9 |
@@ -30,11 +30,11 @@ time_t_string(time_t when) {
|
|
|
c563b9 |
return buf;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("failed-fencing-history", "stonith_history_t *", "GListPtr", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("failed-fencing-history", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__failed_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_spacer = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -58,11 +58,11 @@ stonith__failed_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("fencing-history", "stonith_history_t *", "GListPtr", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("fencing-history", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_spacer = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -84,12 +84,12 @@ stonith__history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GListPtr", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__full_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
crm_exit_t history_rc G_GNUC_UNUSED = va_arg(args, crm_exit_t);
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_spacer = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -109,12 +109,12 @@ stonith__full_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GListPtr", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__full_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
crm_exit_t history_rc = va_arg(args, crm_exit_t);
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_spacer G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -198,11 +198,11 @@ stonith__last_fenced_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("pending-fencing-actions", "stonith_history_t *", "GListPtr", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("pending-fencing-actions", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__pending_actions(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_spacer = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pacemaker/pcmk_output.c b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
index 74a7c59..a0b12b9 100644
|
|
|
c563b9 |
--- a/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
+++ b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
@@ -53,8 +53,8 @@ static int colocations_list(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean dependents = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean recursive = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr list = rsc->rsc_cons;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *list = rsc->rsc_cons;
|
|
|
c563b9 |
bool printed_header = false;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (dependents) {
|
|
|
c563b9 |
@@ -133,8 +133,8 @@ static int colocations_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean dependents = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean recursive = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr list = rsc->rsc_cons;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *list = rsc->rsc_cons;
|
|
|
c563b9 |
bool printed_header = false;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (dependents) {
|
|
|
c563b9 |
@@ -220,15 +220,15 @@ PCMK__OUTPUT_ARGS("locations-list", "pe_resource_t *")
|
|
|
c563b9 |
static int locations_list(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc G_GNUC_UNUSED = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr list = rsc->rsc_location;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *list = rsc->rsc_location;
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Locations");
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc = list; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe__location_t *cons = lpc->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc2 = NULL;
|
|
|
c563b9 |
+ GList *lpc2 = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc2 = cons->node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) lpc2->data;
|
|
|
c563b9 |
@@ -249,15 +249,15 @@ PCMK__OUTPUT_ARGS("locations-list", "pe_resource_t *")
|
|
|
c563b9 |
static int locations_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr list = rsc->rsc_location;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *list = rsc->rsc_location;
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_xml_create_parent(out, "locations", NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc = list; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe__location_t *cons = lpc->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc2 = NULL;
|
|
|
c563b9 |
+ GList *lpc2 = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc2 = cons->node_list_rh; lpc2 != NULL; lpc2 = lpc2->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) lpc2->data;
|
|
|
c563b9 |
@@ -284,9 +284,9 @@ stacks_and_constraints(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set G_GNUC_UNUSED = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
gboolean recursive G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- xmlNode *cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS,
|
|
|
c563b9 |
- data_set->input);
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ xmlNodePtr cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS,
|
|
|
c563b9 |
+ data_set->input);
|
|
|
c563b9 |
|
|
|
c563b9 |
unpack_constraints(cib_constraints, data_set);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -322,9 +322,9 @@ stacks_and_constraints_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
gboolean recursive = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- xmlNode *cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS,
|
|
|
c563b9 |
- data_set->input);
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ xmlNodePtr cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS,
|
|
|
c563b9 |
+ data_set->input);
|
|
|
c563b9 |
|
|
|
c563b9 |
unpack_constraints(cib_constraints, data_set);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -455,11 +455,11 @@ dc_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("crmadmin-node-list", "pcmk__output_t *", "xmlNode *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("crmadmin-node-list", "pcmk__output_t *", "xmlNodePtr")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
crmadmin_node_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- xmlNode *xml_node = va_arg(args, xmlNode *);
|
|
|
c563b9 |
+ xmlNodePtr xml_node = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
int found = 0;
|
|
|
c563b9 |
xmlNode *node = NULL;
|
|
|
c563b9 |
xmlNode *nodes = get_object_root(XML_CIB_TAG_NODES, xml_node);
|
|
|
c563b9 |
diff --git a/lib/pengine/bundle.c b/lib/pengine/bundle.c
|
|
|
c563b9 |
index 543f5dc..7a175a5 100644
|
|
|
c563b9 |
--- a/lib/pengine/bundle.c
|
|
|
c563b9 |
+++ b/lib/pengine/bundle.c
|
|
|
c563b9 |
@@ -1485,14 +1485,14 @@ bundle_print_xml(pe_resource_t *rsc, const char *pre_text, long options,
|
|
|
c563b9 |
free(child_text);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__bundle_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe__bundle_variant_data_t *bundle_data = NULL;
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
@@ -1608,14 +1608,14 @@ pe__bundle_replica_output_html(pcmk__output_t *out, pe__bundle_replica_t *replic
|
|
|
c563b9 |
pe__common_output_html(out, rsc, buffer, node, options);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__bundle_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe__bundle_variant_data_t *bundle_data = NULL;
|
|
|
c563b9 |
char buffer[LINE_MAX];
|
|
|
c563b9 |
@@ -1750,14 +1750,14 @@ pe__bundle_replica_output_text(pcmk__output_t *out, pe__bundle_replica_t *replic
|
|
|
c563b9 |
pe__common_output_text(out, rsc, buffer, node, options);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("bundle", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__bundle_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe__bundle_variant_data_t *bundle_data = NULL;
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
diff --git a/lib/pengine/clone.c b/lib/pengine/clone.c
|
|
|
c563b9 |
index 0708fdc..9b48d01 100644
|
|
|
c563b9 |
--- a/lib/pengine/clone.c
|
|
|
c563b9 |
+++ b/lib/pengine/clone.c
|
|
|
c563b9 |
@@ -577,16 +577,16 @@ clone_print(pe_resource_t * rsc, const char *pre_text, long options, void *print
|
|
|
c563b9 |
free(child_text);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__clone_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr gIter = rsc->children;
|
|
|
c563b9 |
+ GList *gIter = rsc->children;
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
gboolean printed_header = FALSE;
|
|
|
c563b9 |
gboolean print_everything = TRUE;
|
|
|
c563b9 |
@@ -635,23 +635,23 @@ pe__clone_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
char *list_text = NULL;
|
|
|
c563b9 |
char *stopped_list = NULL;
|
|
|
c563b9 |
size_t list_text_len = 0;
|
|
|
c563b9 |
size_t stopped_list_len = 0;
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr master_list = NULL;
|
|
|
c563b9 |
- GListPtr started_list = NULL;
|
|
|
c563b9 |
- GListPtr gIter = rsc->children;
|
|
|
c563b9 |
+ GList *master_list = NULL;
|
|
|
c563b9 |
+ GList *started_list = NULL;
|
|
|
c563b9 |
+ GList *gIter = rsc->children;
|
|
|
c563b9 |
|
|
|
c563b9 |
clone_variant_data_t *clone_data = NULL;
|
|
|
c563b9 |
int active_instances = 0;
|
|
|
c563b9 |
@@ -751,7 +751,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (print_full) {
|
|
|
c563b9 |
- GListPtr all = NULL;
|
|
|
c563b9 |
+ GList *all = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
/* Print every resource that's a child of this clone. */
|
|
|
c563b9 |
all = g_list_prepend(all, strdup("*"));
|
|
|
c563b9 |
@@ -832,8 +832,8 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
if (!pcmk_is_set(rsc->flags, pe_rsc_unique)
|
|
|
c563b9 |
&& (clone_data->clone_max > active_instances)) {
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr nIter;
|
|
|
c563b9 |
- GListPtr list = g_hash_table_get_values(rsc->allowed_nodes);
|
|
|
c563b9 |
+ GList *nIter;
|
|
|
c563b9 |
+ GList *list = g_hash_table_get_values(rsc->allowed_nodes);
|
|
|
c563b9 |
|
|
|
c563b9 |
/* Custom stopped list for non-unique clones */
|
|
|
c563b9 |
free(stopped_list);
|
|
|
c563b9 |
@@ -872,23 +872,23 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("clone", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__clone_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
char *list_text = NULL;
|
|
|
c563b9 |
char *stopped_list = NULL;
|
|
|
c563b9 |
size_t list_text_len = 0;
|
|
|
c563b9 |
size_t stopped_list_len = 0;
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr master_list = NULL;
|
|
|
c563b9 |
- GListPtr started_list = NULL;
|
|
|
c563b9 |
- GListPtr gIter = rsc->children;
|
|
|
c563b9 |
+ GList *master_list = NULL;
|
|
|
c563b9 |
+ GList *started_list = NULL;
|
|
|
c563b9 |
+ GList *gIter = rsc->children;
|
|
|
c563b9 |
|
|
|
c563b9 |
clone_variant_data_t *clone_data = NULL;
|
|
|
c563b9 |
int active_instances = 0;
|
|
|
c563b9 |
@@ -988,7 +988,7 @@ pe__clone_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (print_full) {
|
|
|
c563b9 |
- GListPtr all = NULL;
|
|
|
c563b9 |
+ GList *all = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
/* Print every resource that's a child of this clone. */
|
|
|
c563b9 |
all = g_list_prepend(all, strdup("*"));
|
|
|
c563b9 |
@@ -1067,8 +1067,8 @@ pe__clone_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
if (!pcmk_is_set(rsc->flags, pe_rsc_unique)
|
|
|
c563b9 |
&& (clone_data->clone_max > active_instances)) {
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr nIter;
|
|
|
c563b9 |
- GListPtr list = g_hash_table_get_values(rsc->allowed_nodes);
|
|
|
c563b9 |
+ GList *nIter;
|
|
|
c563b9 |
+ GList *list = g_hash_table_get_values(rsc->allowed_nodes);
|
|
|
c563b9 |
|
|
|
c563b9 |
/* Custom stopped list for non-unique clones */
|
|
|
c563b9 |
free(stopped_list);
|
|
|
c563b9 |
diff --git a/lib/pengine/group.c b/lib/pengine/group.c
|
|
|
c563b9 |
index 33aa177..58c9f7c 100644
|
|
|
c563b9 |
--- a/lib/pengine/group.c
|
|
|
c563b9 |
+++ b/lib/pengine/group.c
|
|
|
c563b9 |
@@ -180,16 +180,16 @@ group_print(pe_resource_t * rsc, const char *pre_text, long options, void *print
|
|
|
c563b9 |
free(child_text);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__group_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr gIter = rsc->children;
|
|
|
c563b9 |
+ GList *gIter = rsc->children;
|
|
|
c563b9 |
char *count = crm_itoa(g_list_length(gIter));
|
|
|
c563b9 |
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
@@ -231,14 +231,14 @@ pe__group_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__group_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
gboolean print_everything = TRUE;
|
|
|
c563b9 |
@@ -251,7 +251,7 @@ pe__group_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
(strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (options & pe_print_brief) {
|
|
|
c563b9 |
- GListPtr rscs = pe__filter_rsc_list(rsc->children, only_rsc);
|
|
|
c563b9 |
+ GList *rscs = pe__filter_rsc_list(rsc->children, only_rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (rscs != NULL) {
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Resource Group: %s%s%s", rsc->id,
|
|
|
c563b9 |
@@ -265,7 +265,7 @@ pe__group_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- for (GListPtr gIter = rsc->children; gIter; gIter = gIter->next) {
|
|
|
c563b9 |
+ for (GList *gIter = rsc->children; gIter; gIter = gIter->next) {
|
|
|
c563b9 |
pe_resource_t *child_rsc = (pe_resource_t *) gIter->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (child_rsc->fns->is_filtered(child_rsc, only_rsc, print_everything)) {
|
|
|
c563b9 |
@@ -286,14 +286,14 @@ pe__group_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("group", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__group_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
gboolean print_everything = TRUE;
|
|
|
c563b9 |
@@ -306,7 +306,7 @@ pe__group_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
(strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (options & pe_print_brief) {
|
|
|
c563b9 |
- GListPtr rscs = pe__filter_rsc_list(rsc->children, only_rsc);
|
|
|
c563b9 |
+ GList *rscs = pe__filter_rsc_list(rsc->children, only_rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (rscs != NULL) {
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Resource Group: %s%s%s", rsc->id,
|
|
|
c563b9 |
@@ -320,7 +320,7 @@ pe__group_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- for (GListPtr gIter = rsc->children; gIter; gIter = gIter->next) {
|
|
|
c563b9 |
+ for (GList *gIter = rsc->children; gIter; gIter = gIter->next) {
|
|
|
c563b9 |
pe_resource_t *child_rsc = (pe_resource_t *) gIter->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (child_rsc->fns->is_filtered(child_rsc, only_rsc, print_everything)) {
|
|
|
c563b9 |
diff --git a/lib/pengine/native.c b/lib/pengine/native.c
|
|
|
c563b9 |
index 38e9350..6f27d7b 100644
|
|
|
c563b9 |
--- a/lib/pengine/native.c
|
|
|
c563b9 |
+++ b/lib/pengine/native.c
|
|
|
c563b9 |
@@ -920,14 +920,14 @@ native_print(pe_resource_t * rsc, const char *pre_text, long options, void *prin
|
|
|
c563b9 |
common_print(rsc, pre_text, rsc_printable_id(rsc), node, options, print_data);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__resource_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node G_GNUC_UNUSED = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node G_GNUC_UNUSED = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
const char *class = crm_element_value(rsc->xml, XML_AGENT_ATTR_CLASS);
|
|
|
c563b9 |
const char *prov = crm_element_value(rsc->xml, XML_AGENT_ATTR_PROVIDER);
|
|
|
c563b9 |
@@ -977,7 +977,7 @@ pe__resource_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
CRM_ASSERT(rc == pcmk_rc_ok);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (rsc->running_on != NULL) {
|
|
|
c563b9 |
- GListPtr gIter = rsc->running_on;
|
|
|
c563b9 |
+ GList *gIter = rsc->running_on;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) gIter->data;
|
|
|
c563b9 |
@@ -994,14 +994,14 @@ pe__resource_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__resource_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node G_GNUC_UNUSED = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node G_GNUC_UNUSED = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe_node_t *node = pe__current_node(rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1018,14 +1018,14 @@ pe__resource_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pe__common_output_html(out, rsc, rsc_printable_id(rsc), node, options);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("primitive", "unsigned int", "pe_resource_t *", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__resource_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
unsigned int options = va_arg(args, unsigned int);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- GListPtr only_node G_GNUC_UNUSED = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node G_GNUC_UNUSED = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe_node_t *node = pe__current_node(rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
|
|
|
c563b9 |
index ecb5c2c..3d2fc24 100644
|
|
|
c563b9 |
--- a/lib/pengine/pe_output.c
|
|
|
c563b9 |
+++ b/lib/pengine/pe_output.c
|
|
|
c563b9 |
@@ -1013,7 +1013,7 @@ pe__failed_action_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node", "pe_node_t *", "unsigned int", "gboolean", "const char *",
|
|
|
c563b9 |
- "gboolean", "gboolean", "gboolean", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+ "gboolean", "gboolean", "gboolean", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
@@ -1023,8 +1023,8 @@ pe__node_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean group_by_node = va_arg(args, gboolean);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
char *node_name = pe__node_display_name(node, print_clone_detail);
|
|
|
c563b9 |
char *buf = crm_strdup_printf("Node: %s", node_name);
|
|
|
c563b9 |
@@ -1052,7 +1052,7 @@ pe__node_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pcmk_create_html_node(item_node, "span", NULL, "offline", " OFFLINE");
|
|
|
c563b9 |
}
|
|
|
c563b9 |
if (print_brief && group_by_node) {
|
|
|
c563b9 |
- GListPtr rscs = pe__filter_rsc_list(node->details->running_rsc, only_rsc);
|
|
|
c563b9 |
+ GList *rscs = pe__filter_rsc_list(node->details->running_rsc, only_rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (rscs != NULL) {
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, NULL);
|
|
|
c563b9 |
@@ -1061,7 +1061,7 @@ pe__node_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
} else if (group_by_node) {
|
|
|
c563b9 |
- GListPtr lpc2 = NULL;
|
|
|
c563b9 |
+ GList *lpc2 = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, NULL);
|
|
|
c563b9 |
for (lpc2 = node->details->running_rsc; lpc2 != NULL; lpc2 = lpc2->next) {
|
|
|
c563b9 |
@@ -1081,7 +1081,7 @@ pe__node_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node", "pe_node_t *", "unsigned int", "gboolean", "const char *",
|
|
|
c563b9 |
- "gboolean", "gboolean", "gboolean", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+ "gboolean", "gboolean", "gboolean", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
@@ -1091,8 +1091,8 @@ pe__node_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean group_by_node = va_arg(args, gboolean);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (full) {
|
|
|
c563b9 |
char *node_name = pe__node_display_name(node, print_clone_detail);
|
|
|
c563b9 |
@@ -1110,7 +1110,7 @@ pe__node_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
/* If we're grouping by node, print its resources */
|
|
|
c563b9 |
if (group_by_node) {
|
|
|
c563b9 |
if (print_brief) {
|
|
|
c563b9 |
- GListPtr rscs = pe__filter_rsc_list(node->details->running_rsc, only_rsc);
|
|
|
c563b9 |
+ GList *rscs = pe__filter_rsc_list(node->details->running_rsc, only_rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (rscs != NULL) {
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "%s", buf);
|
|
|
c563b9 |
@@ -1123,7 +1123,7 @@ pe__node_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- GListPtr gIter2 = NULL;
|
|
|
c563b9 |
+ GList *gIter2 = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "%s", buf);
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Resources");
|
|
|
c563b9 |
@@ -1151,7 +1151,7 @@ pe__node_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node", "pe_node_t *", "unsigned int", "gboolean", "const char *",
|
|
|
c563b9 |
- "gboolean", "gboolean", "gboolean", "GListPtr", "GListPtr")
|
|
|
c563b9 |
+ "gboolean", "gboolean", "gboolean", "GList *", "GList *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
@@ -1161,8 +1161,8 @@ pe__node_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean print_clone_detail G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean group_by_node = va_arg(args, gboolean);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (full) {
|
|
|
c563b9 |
const char *node_type = "unknown";
|
|
|
c563b9 |
@@ -1200,7 +1200,7 @@ pe__node_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (group_by_node) {
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc = node->details->running_rsc; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_resource_t *rsc = (pe_resource_t *) lpc->data;
|
|
|
c563b9 |
@@ -1401,12 +1401,12 @@ pe__node_attribute_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("node-list", "GListPtr", "GListPtr", "GListPtr", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("node-list", "GList *", "GList *", "GList *", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_list_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- GListPtr nodes = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
unsigned int print_opts = va_arg(args, unsigned int);
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -1414,7 +1414,7 @@ pe__node_list_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
- for (GListPtr gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
+ for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) gIter->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!pcmk__str_in_list(only_node, node->details->uname)) {
|
|
|
c563b9 |
@@ -1431,12 +1431,12 @@ pe__node_list_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("node-list", "GListPtr", "GListPtr", "GListPtr", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("node-list", "GList *", "GList *", "GList *", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- GListPtr nodes = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
unsigned int print_opts = va_arg(args, unsigned int);
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -1457,7 +1457,7 @@ pe__node_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
- for (GListPtr gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
+ for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) gIter->data;
|
|
|
c563b9 |
const char *node_mode = NULL;
|
|
|
c563b9 |
char *node_name = pe__node_display_name(node, print_clone_detail);
|
|
|
c563b9 |
@@ -1570,19 +1570,19 @@ pe__node_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("node-list", "GListPtr", "GListPtr", "GListPtr", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("node-list", "GList *", "GList *", "GList *", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__node_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- GListPtr nodes = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
unsigned int print_opts = va_arg(args, unsigned int);
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_brief = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean group_by_node = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "nodes");
|
|
|
c563b9 |
- for (GListPtr gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
+ for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) gIter->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!pcmk__str_in_list(only_node, node->details->uname)) {
|
|
|
c563b9 |
@@ -1597,10 +1597,10 @@ pe__node_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("op-history", "struct xmlNode *", "const char *", "const char *", "int", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("op-history", "xmlNodePtr", "const char *", "const char *", "int", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__op_history_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNode *xml_op = va_arg(args, xmlNode *);
|
|
|
c563b9 |
+ xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
const char *task = va_arg(args, const char *);
|
|
|
c563b9 |
const char *interval_ms_s = va_arg(args, const char *);
|
|
|
c563b9 |
int rc = va_arg(args, int);
|
|
|
c563b9 |
@@ -1614,10 +1614,10 @@ pe__op_history_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("op-history", "struct xmlNode *", "const char *", "const char *", "int", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("op-history", "xmlNodePtr", "const char *", "const char *", "int", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__op_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNode *xml_op = va_arg(args, xmlNode *);
|
|
|
c563b9 |
+ xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
const char *task = va_arg(args, const char *);
|
|
|
c563b9 |
const char *interval_ms_s = va_arg(args, const char *);
|
|
|
c563b9 |
int rc = va_arg(args, int);
|
|
|
c563b9 |
@@ -1760,7 +1760,7 @@ pe__resource_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("resource-list", "pe_working_set_t *", "unsigned int", "gboolean",
|
|
|
c563b9 |
- "gboolean", "gboolean", "gboolean", "GListPtr", "GListPtr", "gboolean")
|
|
|
c563b9 |
+ "gboolean", "gboolean", "gboolean", "GList *", "GList *", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
@@ -1770,11 +1770,11 @@ pe__resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
gboolean inactive_resources = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean brief_output = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean print_summary = va_arg(args, gboolean);
|
|
|
c563b9 |
- GListPtr only_node = va_arg(args, GListPtr);
|
|
|
c563b9 |
- GListPtr only_rsc = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
+ GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
gboolean print_spacer = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
- GListPtr rsc_iter;
|
|
|
c563b9 |
+ GList *rsc_iter;
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
/* If we already showed active resources by node, and
|
|
|
c563b9 |
@@ -1798,7 +1798,7 @@ pe__resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
/* If we haven't already printed resources grouped by node,
|
|
|
c563b9 |
* and brief output was requested, print resource summary */
|
|
|
c563b9 |
if (brief_output && !group_by_node) {
|
|
|
c563b9 |
- GListPtr rscs = pe__filter_rsc_list(data_set->resources, only_rsc);
|
|
|
c563b9 |
+ GList *rscs = pe__filter_rsc_list(data_set->resources, only_rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe__rscs_brief_output(out, rscs, print_opts, inactive_resources);
|
|
|
c563b9 |
g_list_free(rscs);
|
|
|
c563b9 |
diff --git a/tools/crm_resource_print.c b/tools/crm_resource_print.c
|
|
|
c563b9 |
index cb06879..4cb78b5 100644
|
|
|
c563b9 |
--- a/tools/crm_resource_print.c
|
|
|
c563b9 |
+++ b/tools/crm_resource_print.c
|
|
|
c563b9 |
@@ -247,9 +247,9 @@ resource_check_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *parent = uber_parent(checks->rsc);
|
|
|
c563b9 |
int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
- xmlNode *node = pcmk__output_create_xml_node(out, "check",
|
|
|
c563b9 |
- "id", parent->id,
|
|
|
c563b9 |
- NULL);
|
|
|
c563b9 |
+ xmlNodePtr node = pcmk__output_create_xml_node(out, "check",
|
|
|
c563b9 |
+ "id", parent->id,
|
|
|
c563b9 |
+ NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (pcmk_is_set(checks->flags, rsc_remain_stopped)) {
|
|
|
c563b9 |
crm_xml_add(node, "remain_stopped", "true");
|
|
|
c563b9 |
@@ -270,11 +270,11 @@ resource_check_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-search", "GListPtr", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-search", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
resource_search_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- GListPtr nodes = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
gchar *requested_name = va_arg(args, gchar *);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -286,7 +286,7 @@ resource_search_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
- for (GListPtr lpc = nodes; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
+ for (GList *lpc = nodes; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) lpc->data;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!printed) {
|
|
|
c563b9 |
@@ -316,11 +316,11 @@ resource_search_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-search", "GListPtr", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-search", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
resource_search_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- GListPtr nodes = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
gchar *requested_name = va_arg(args, gchar *);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -328,9 +328,9 @@ resource_search_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
"resource", requested_name,
|
|
|
c563b9 |
NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
- for (GListPtr lpc = nodes; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
+ for (GList *lpc = nodes; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_node_t *node = (pe_node_t *) lpc->data;
|
|
|
c563b9 |
- xmlNode *sub_node = pcmk__output_create_xml_text_node(out, "node", node->details->uname);
|
|
|
c563b9 |
+ xmlNodePtr sub_node = pcmk__output_create_xml_text_node(out, "node", node->details->uname);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!pe_rsc_is_clone(rsc) && rsc->fns->state(rsc, TRUE) == RSC_ROLE_MASTER) {
|
|
|
c563b9 |
crm_xml_add(sub_node, "state", "promoted");
|
|
|
c563b9 |
@@ -340,13 +340,13 @@ resource_search_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GListPtr", "pe_resource_t *",
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
"pe_node_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
cib_t *cib_conn = va_arg(args, cib_t *);
|
|
|
c563b9 |
- GListPtr resources = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *resources = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
pe_node_t *node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -355,8 +355,8 @@ resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Resource Reasons");
|
|
|
c563b9 |
|
|
|
c563b9 |
if ((rsc == NULL) && (host_uname == NULL)) {
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr hosts = NULL;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *hosts = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc = resources; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_resource_t *rsc = (pe_resource_t *) lpc->data;
|
|
|
c563b9 |
@@ -386,10 +386,10 @@ resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
|
|
|
c563b9 |
} else if ((rsc == NULL) && (host_uname != NULL)) {
|
|
|
c563b9 |
const char* host_uname = node->details->uname;
|
|
|
c563b9 |
- GListPtr allResources = node->details->allocated_rsc;
|
|
|
c563b9 |
- GListPtr activeResources = node->details->running_rsc;
|
|
|
c563b9 |
- GListPtr unactiveResources = pcmk__subtract_lists(allResources, activeResources, (GCompareFunc) strcmp);
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
+ GList *allResources = node->details->allocated_rsc;
|
|
|
c563b9 |
+ GList *activeResources = node->details->running_rsc;
|
|
|
c563b9 |
+ GList *unactiveResources = pcmk__subtract_lists(allResources, activeResources, (GCompareFunc) strcmp);
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
for (lpc = activeResources; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_resource_t *rsc = (pe_resource_t *) lpc->data;
|
|
|
c563b9 |
@@ -410,7 +410,7 @@ resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
g_list_free(unactiveResources);
|
|
|
c563b9 |
|
|
|
c563b9 |
} else if ((rsc != NULL) && (host_uname == NULL)) {
|
|
|
c563b9 |
- GListPtr hosts = NULL;
|
|
|
c563b9 |
+ GList *hosts = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
rsc->fns->location(rsc, &hosts, TRUE);
|
|
|
c563b9 |
out->list_item(out, "reason", "Resource %s is %srunning",
|
|
|
c563b9 |
@@ -423,23 +423,23 @@ resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GListPtr", "pe_resource_t *",
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
"pe_node_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
resource_why_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
cib_t *cib_conn = va_arg(args, cib_t *);
|
|
|
c563b9 |
- GListPtr resources = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *resources = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
pe_node_t *node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
const char *host_uname = (node == NULL)? NULL : node->details->uname;
|
|
|
c563b9 |
|
|
|
c563b9 |
- xmlNode *xml_node = pcmk__output_xml_create_parent(out, "reason", NULL);
|
|
|
c563b9 |
+ xmlNodePtr xml_node = pcmk__output_xml_create_parent(out, "reason", NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
if ((rsc == NULL) && (host_uname == NULL)) {
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
- GListPtr hosts = NULL;
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
+ GList *hosts = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_xml_create_parent(out, "resources", NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -470,10 +470,10 @@ resource_why_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
|
|
|
c563b9 |
} else if ((rsc == NULL) && (host_uname != NULL)) {
|
|
|
c563b9 |
const char* host_uname = node->details->uname;
|
|
|
c563b9 |
- GListPtr allResources = node->details->allocated_rsc;
|
|
|
c563b9 |
- GListPtr activeResources = node->details->running_rsc;
|
|
|
c563b9 |
- GListPtr unactiveResources = pcmk__subtract_lists(allResources, activeResources, (GCompareFunc) strcmp);
|
|
|
c563b9 |
- GListPtr lpc = NULL;
|
|
|
c563b9 |
+ GList *allResources = node->details->allocated_rsc;
|
|
|
c563b9 |
+ GList *activeResources = node->details->running_rsc;
|
|
|
c563b9 |
+ GList *unactiveResources = pcmk__subtract_lists(allResources, activeResources, (GCompareFunc) strcmp);
|
|
|
c563b9 |
+ GList *lpc = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_xml_create_parent(out, "resources", NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -509,7 +509,7 @@ resource_why_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
g_list_free(unactiveResources);
|
|
|
c563b9 |
|
|
|
c563b9 |
} else if ((rsc != NULL) && (host_uname == NULL)) {
|
|
|
c563b9 |
- GListPtr hosts = NULL;
|
|
|
c563b9 |
+ GList *hosts = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
rsc->fns->location(rsc, &hosts, TRUE);
|
|
|
c563b9 |
crm_xml_add(xml_node, "running", pcmk__btoa(hosts != NULL));
|
|
|
c563b9 |
@@ -532,10 +532,10 @@ add_resource_name(pcmk__output_t *out, pe_resource_t *rsc) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-names-list", "GListPtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-names-list", "GList *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
resource_names(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- GListPtr resources = va_arg(args, GListPtr);
|
|
|
c563b9 |
+ GList *resources = va_arg(args, GList *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (resources == NULL) {
|
|
|
c563b9 |
out->err(out, "NO resources configured\n");
|
|
|
c563b9 |
@@ -544,7 +544,7 @@ resource_names(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "Resource Names");
|
|
|
c563b9 |
|
|
|
c563b9 |
- for (GListPtr lpc = resources; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
+ for (GList *lpc = resources; lpc != NULL; lpc = lpc->next) {
|
|
|
c563b9 |
pe_resource_t *rsc = (pe_resource_t *) lpc->data;
|
|
|
c563b9 |
add_resource_name(out, rsc);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 2075e40607d4a73617a079163cb7c6a2301b7d86 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Mon, 9 Nov 2020 10:41:34 -0500
|
|
|
c563b9 |
Subject: [PATCH 2/9] Fix: libpacemaker: Remove some G_GNUC_UNUSED references.
|
|
|
c563b9 |
|
|
|
c563b9 |
These variables are, in fact, being used.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/pacemaker/pcmk_output.c | 8 ++++----
|
|
|
c563b9 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pacemaker/pcmk_output.c b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
index a0b12b9..a2bc931 100644
|
|
|
c563b9 |
--- a/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
+++ b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
@@ -218,7 +218,7 @@ static int colocations_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("locations-list", "pe_resource_t *")
|
|
|
c563b9 |
static int locations_list(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- pe_resource_t *rsc G_GNUC_UNUSED = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
+ pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
GList *lpc = NULL;
|
|
|
c563b9 |
GList *list = rsc->rsc_location;
|
|
|
c563b9 |
@@ -280,9 +280,9 @@ static int locations_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("stacks-constraints", "pe_resource_t *", "pe_working_set_t *", "gboolean")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
stacks_and_constraints(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- pe_resource_t *rsc G_GNUC_UNUSED = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
- pe_working_set_t *data_set G_GNUC_UNUSED = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
- gboolean recursive G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
+ pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
+ pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
+ gboolean recursive = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
GList *lpc = NULL;
|
|
|
c563b9 |
xmlNodePtr cib_constraints = get_object_root(XML_CIB_TAG_CONSTRAINTS,
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 578f7a22fd75b50fce21de474d6b373146a00666 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Fri, 20 Nov 2020 16:20:23 -0500
|
|
|
c563b9 |
Subject: [PATCH 3/9] Fix: libs, tools: Rearrange formatted output args
|
|
|
c563b9 |
popping.
|
|
|
c563b9 |
|
|
|
c563b9 |
For consistency, move all the va_args stuff to the beginning of each
|
|
|
c563b9 |
function, and then declare other variables after that.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/pacemaker/pcmk_output.c | 1 +
|
|
|
c563b9 |
lib/pengine/pe_output.c | 37 ++++++++++++++++++++-----------------
|
|
|
c563b9 |
tools/crm_mon_curses.c | 1 +
|
|
|
c563b9 |
3 files changed, 22 insertions(+), 17 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pacemaker/pcmk_output.c b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
index a2bc931..deb1fe5 100644
|
|
|
c563b9 |
--- a/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
+++ b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
@@ -460,6 +460,7 @@ static int
|
|
|
c563b9 |
crmadmin_node_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
xmlNodePtr xml_node = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
int found = 0;
|
|
|
c563b9 |
xmlNode *node = NULL;
|
|
|
c563b9 |
xmlNode *nodes = get_object_root(XML_CIB_TAG_NODES, xml_node);
|
|
|
c563b9 |
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
|
|
|
c563b9 |
index 3d2fc24..a7118a4 100644
|
|
|
c563b9 |
--- a/lib/pengine/pe_output.c
|
|
|
c563b9 |
+++ b/lib/pengine/pe_output.c
|
|
|
c563b9 |
@@ -216,8 +216,8 @@ pe__cluster_summary(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean show_times = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean show_counts = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean show_options = va_arg(args, gboolean);
|
|
|
c563b9 |
- int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
+ int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
const char *stack_s = get_cluster_stack(data_set);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (show_stack) {
|
|
|
c563b9 |
@@ -282,8 +282,8 @@ pe__cluster_summary_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean show_times = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean show_counts = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean show_options = va_arg(args, gboolean);
|
|
|
c563b9 |
- int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
|
|
|
c563b9 |
+ int rc = pcmk_rc_no_output;
|
|
|
c563b9 |
const char *stack_s = get_cluster_stack(data_set);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (show_stack) {
|
|
|
c563b9 |
@@ -487,14 +487,14 @@ pe__ban_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-counts", "unsigned int", "int", "int", "int")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_counts_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr nodes_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
- xmlNodePtr resources_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
-
|
|
|
c563b9 |
unsigned int nnodes = va_arg(args, unsigned int);
|
|
|
c563b9 |
int nresources = va_arg(args, int);
|
|
|
c563b9 |
int ndisabled = va_arg(args, int);
|
|
|
c563b9 |
int nblocked = va_arg(args, int);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr nodes_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+ xmlNodePtr resources_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
char *nnodes_str = crm_strdup_printf("%d node%s configured",
|
|
|
c563b9 |
nnodes, pcmk__plural_s(nnodes));
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -583,14 +583,14 @@ pe__cluster_counts_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-counts", "unsigned int", "int", "int", "int")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_counts_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr nodes_node = pcmk__output_create_xml_node(out, "nodes_configured", NULL);
|
|
|
c563b9 |
- xmlNodePtr resources_node = pcmk__output_create_xml_node(out, "resources_configured", NULL);
|
|
|
c563b9 |
-
|
|
|
c563b9 |
unsigned int nnodes = va_arg(args, unsigned int);
|
|
|
c563b9 |
int nresources = va_arg(args, int);
|
|
|
c563b9 |
int ndisabled = va_arg(args, int);
|
|
|
c563b9 |
int nblocked = va_arg(args, int);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr nodes_node = pcmk__output_create_xml_node(out, "nodes_configured", NULL);
|
|
|
c563b9 |
+ xmlNodePtr resources_node = pcmk__output_create_xml_node(out, "resources_configured", NULL);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
char *s = crm_itoa(nnodes);
|
|
|
c563b9 |
crm_xml_add(nodes_node, "number", s);
|
|
|
c563b9 |
free(s);
|
|
|
c563b9 |
@@ -613,13 +613,13 @@ pe__cluster_counts_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-dc", "pe_node_t *", "const char *", "const char *", "char *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_dc_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
-
|
|
|
c563b9 |
pe_node_t *dc = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
const char *quorum = va_arg(args, const char *);
|
|
|
c563b9 |
const char *dc_version_s = va_arg(args, const char *);
|
|
|
c563b9 |
char *dc_name = va_arg(args, char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
pcmk_create_html_node(node, "span", NULL, "bold", "Current DC: ");
|
|
|
c563b9 |
|
|
|
c563b9 |
if (dc) {
|
|
|
c563b9 |
@@ -820,6 +820,7 @@ PCMK__OUTPUT_ARGS("cluster-options", "pe_working_set_t *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_options_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
const char *no_quorum_policy = NULL;
|
|
|
c563b9 |
|
|
|
c563b9 |
switch (data_set->no_quorum_policy) {
|
|
|
c563b9 |
@@ -857,9 +858,10 @@ pe__cluster_options_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-stack", "const char *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_stack_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
const char *stack_s = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
pcmk_create_html_node(node, "span", NULL, "bold", "Stack: ");
|
|
|
c563b9 |
pcmk_create_html_node(node, "span", NULL, NULL, stack_s);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -870,6 +872,7 @@ PCMK__OUTPUT_ARGS("cluster-stack", "const char *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_stack_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *stack_s = va_arg(args, const char *);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
out->list_item(out, "Stack", "%s", stack_s);
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -889,14 +892,14 @@ pe__cluster_stack_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-times", "const char *", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__cluster_times_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr updated_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
- xmlNodePtr changed_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
-
|
|
|
c563b9 |
const char *last_written = va_arg(args, const char *);
|
|
|
c563b9 |
const char *user = va_arg(args, const char *);
|
|
|
c563b9 |
const char *client = va_arg(args, const char *);
|
|
|
c563b9 |
const char *origin = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr updated_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+ xmlNodePtr changed_node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
char *buf = last_changed_string(last_written, user, client, origin);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk_create_html_node(updated_node, "span", NULL, "bold", "Last updated: ");
|
|
|
c563b9 |
@@ -952,6 +955,7 @@ PCMK__OUTPUT_ARGS("failed-action", "xmlNodePtr")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__failed_action_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
char *s = failed_action_string(xml_op);
|
|
|
c563b9 |
|
|
|
c563b9 |
out->list_item(out, NULL, "%s", s);
|
|
|
c563b9 |
@@ -1229,7 +1233,6 @@ pe__node_attribute_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
gboolean add_extra = va_arg(args, gboolean);
|
|
|
c563b9 |
int expected_score = va_arg(args, int);
|
|
|
c563b9 |
|
|
|
c563b9 |
-
|
|
|
c563b9 |
if (add_extra) {
|
|
|
c563b9 |
int v = crm_parse_int(value, "0");
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1904,10 +1907,10 @@ pe__ticket_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("ticket", "pe_ticket_t *")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
pe__ticket_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- xmlNodePtr node = NULL;
|
|
|
c563b9 |
-
|
|
|
c563b9 |
pe_ticket_t *ticket = va_arg(args, pe_ticket_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
+ xmlNodePtr node = NULL;
|
|
|
c563b9 |
+
|
|
|
c563b9 |
node = pcmk__output_create_xml_node(out, "ticket",
|
|
|
c563b9 |
"id", ticket->id,
|
|
|
c563b9 |
"status", ticket->granted ? "granted" : "revoked",
|
|
|
c563b9 |
diff --git a/tools/crm_mon_curses.c b/tools/crm_mon_curses.c
|
|
|
c563b9 |
index 9cf28dc..869c7f3 100644
|
|
|
c563b9 |
--- a/tools/crm_mon_curses.c
|
|
|
c563b9 |
+++ b/tools/crm_mon_curses.c
|
|
|
c563b9 |
@@ -369,6 +369,7 @@ PCMK__OUTPUT_ARGS("maint-mode", "unsigned long long int")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
cluster_maint_mode_console(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
unsigned long long flags = va_arg(args, unsigned long long);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
int rc;
|
|
|
c563b9 |
|
|
|
c563b9 |
if (pcmk_is_set(flags, pe_flag_maintenance_mode)) {
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 7a26a80bc7983f79a69c3548a635bf88c031beb7 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Mon, 9 Nov 2020 12:30:19 -0500
|
|
|
c563b9 |
Subject: [PATCH 4/9] Fix: libs: Remove extra whitespace in list_item calls.
|
|
|
c563b9 |
|
|
|
c563b9 |
---
|
|
|
c563b9 |
cts/cli/regression.crm_mon.exp | 50 +++++++++++++++++++++---------------------
|
|
|
c563b9 |
lib/pengine/clone.c | 10 ++++-----
|
|
|
c563b9 |
lib/pengine/native.c | 6 ++---
|
|
|
c563b9 |
lib/pengine/pe_output.c | 4 ++--
|
|
|
c563b9 |
4 files changed, 35 insertions(+), 35 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/cts/cli/regression.crm_mon.exp b/cts/cli/regression.crm_mon.exp
|
|
|
c563b9 |
index e9f36ad..cf7d28e 100644
|
|
|
c563b9 |
--- a/cts/cli/regression.crm_mon.exp
|
|
|
c563b9 |
+++ b/cts/cli/regression.crm_mon.exp
|
|
|
c563b9 |
@@ -480,13 +480,13 @@ Node List:
|
|
|
c563b9 |
* Online: [ cluster01 cluster02 ]
|
|
|
c563b9 |
|
|
|
c563b9 |
Active Resources:
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
- * 1 (stonith:fence_xvm): Active cluster01
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
+ * 1 (stonith:fence_xvm): Active cluster01
|
|
|
c563b9 |
* Clone Set: ping-clone [ping]:
|
|
|
c563b9 |
* Started: [ cluster01 cluster02 ]
|
|
|
c563b9 |
* Resource Group: exim-group:
|
|
|
c563b9 |
- * 1/1 (lsb:exim): Active cluster02
|
|
|
c563b9 |
- * 1/1 (ocf::heartbeat:IPaddr): Active cluster02
|
|
|
c563b9 |
+ * 1/1 (lsb:exim): Active cluster02
|
|
|
c563b9 |
+ * 1/1 (ocf::heartbeat:IPaddr): Active cluster02
|
|
|
c563b9 |
* Clone Set: mysql-clone-group [mysql-group]:
|
|
|
c563b9 |
* Started: [ cluster01 cluster02 ]
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -609,16 +609,16 @@ Cluster Summary:
|
|
|
c563b9 |
Node List:
|
|
|
c563b9 |
* Node cluster01: online:
|
|
|
c563b9 |
* Resources:
|
|
|
c563b9 |
- * 1 (lsb:mysql-proxy): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
- * 1 (stonith:fence_xvm): Active
|
|
|
c563b9 |
+ * 1 (lsb:mysql-proxy): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
+ * 1 (stonith:fence_xvm): Active
|
|
|
c563b9 |
* Node cluster02: online:
|
|
|
c563b9 |
* Resources:
|
|
|
c563b9 |
- * 1 (lsb:exim): Active
|
|
|
c563b9 |
- * 1 (lsb:mysql-proxy): Active
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:IPaddr): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:Dummy): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
+ * 1 (lsb:exim): Active
|
|
|
c563b9 |
+ * 1 (lsb:mysql-proxy): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:IPaddr): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:Dummy): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
|
|
|
c563b9 |
Node Attributes:
|
|
|
c563b9 |
* Node: cluster01:
|
|
|
c563b9 |
@@ -2857,7 +2857,7 @@ Node List:
|
|
|
c563b9 |
* GuestOnline: [ httpd-bundle-0@cluster02 httpd-bundle-1@cluster01 ]
|
|
|
c563b9 |
|
|
|
c563b9 |
Full List of Resources:
|
|
|
c563b9 |
- * 1/1 (stonith:fence_xvm): Active cluster01
|
|
|
c563b9 |
+ * 1/1 (stonith:fence_xvm): Active cluster01
|
|
|
c563b9 |
* Clone Set: ping-clone [ping]:
|
|
|
c563b9 |
* Started: [ cluster01 ]
|
|
|
c563b9 |
* Stopped: [ cluster02 ]
|
|
|
c563b9 |
@@ -2865,7 +2865,7 @@ Full List of Resources:
|
|
|
c563b9 |
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started cluster02
|
|
|
c563b9 |
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped cluster01
|
|
|
c563b9 |
* Resource Group: partially-active-group:
|
|
|
c563b9 |
- * 1/2 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
+ * 1/2 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
|
|
|
c563b9 |
Node Attributes:
|
|
|
c563b9 |
* Node: cluster01:
|
|
|
c563b9 |
@@ -2919,20 +2919,20 @@ Cluster Summary:
|
|
|
c563b9 |
Node List:
|
|
|
c563b9 |
* Node cluster01: online:
|
|
|
c563b9 |
* Resources:
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:IPaddr2): Active
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:docker): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:remote): Active
|
|
|
c563b9 |
- * 1 (stonith:fence_xvm): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:IPaddr2): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:docker): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:ping): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:remote): Active
|
|
|
c563b9 |
+ * 1 (stonith:fence_xvm): Active
|
|
|
c563b9 |
* Node cluster02: online:
|
|
|
c563b9 |
* Resources:
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:IPaddr2): Active
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:docker): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:Dummy): Active
|
|
|
c563b9 |
- * 1 (ocf::pacemaker:remote): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:IPaddr2): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:docker): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:Dummy): Active
|
|
|
c563b9 |
+ * 1 (ocf::pacemaker:remote): Active
|
|
|
c563b9 |
* GuestNode httpd-bundle-0@cluster02: online:
|
|
|
c563b9 |
* Resources:
|
|
|
c563b9 |
- * 1 (ocf::heartbeat:apache): Active
|
|
|
c563b9 |
+ * 1 (ocf::heartbeat:apache): Active
|
|
|
c563b9 |
|
|
|
c563b9 |
Inactive Resources:
|
|
|
c563b9 |
* Clone Set: ping-clone [ping]:
|
|
|
c563b9 |
@@ -2942,7 +2942,7 @@ Inactive Resources:
|
|
|
c563b9 |
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started cluster02
|
|
|
c563b9 |
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped cluster01
|
|
|
c563b9 |
* Resource Group: partially-active-group:
|
|
|
c563b9 |
- * 1/2 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
+ * 1/2 (ocf::pacemaker:Dummy): Active cluster02
|
|
|
c563b9 |
|
|
|
c563b9 |
Node Attributes:
|
|
|
c563b9 |
* Node: cluster01:
|
|
|
c563b9 |
diff --git a/lib/pengine/clone.c b/lib/pengine/clone.c
|
|
|
c563b9 |
index 9b48d01..9e98178 100644
|
|
|
c563b9 |
--- a/lib/pengine/clone.c
|
|
|
c563b9 |
+++ b/lib/pengine/clone.c
|
|
|
c563b9 |
@@ -781,7 +781,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (list_text != NULL) {
|
|
|
c563b9 |
- out->list_item(out, NULL, " Masters: [ %s ]", list_text);
|
|
|
c563b9 |
+ out->list_item(out, NULL, "Masters: [ %s ]", list_text);
|
|
|
c563b9 |
g_list_free(master_list);
|
|
|
c563b9 |
free(list_text);
|
|
|
c563b9 |
list_text = NULL;
|
|
|
c563b9 |
@@ -806,13 +806,13 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
enum rsc_role_e role = configured_role(rsc);
|
|
|
c563b9 |
|
|
|
c563b9 |
if(role == RSC_ROLE_SLAVE) {
|
|
|
c563b9 |
- out->list_item(out, NULL, " Slaves (target-role): [ %s ]", list_text);
|
|
|
c563b9 |
+ out->list_item(out, NULL, "Slaves (target-role): [ %s ]", list_text);
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- out->list_item(out, NULL, " Slaves: [ %s ]", list_text);
|
|
|
c563b9 |
+ out->list_item(out, NULL, "Slaves: [ %s ]", list_text);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- out->list_item(out, NULL, " Started: [ %s ]", list_text);
|
|
|
c563b9 |
+ out->list_item(out, NULL, "Started: [ %s ]", list_text);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
g_list_free(started_list);
|
|
|
c563b9 |
@@ -861,7 +861,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (stopped_list != NULL) {
|
|
|
c563b9 |
- out->list_item(out, NULL, " %s: [ %s ]", state, stopped_list);
|
|
|
c563b9 |
+ out->list_item(out, NULL, "%s: [ %s ]", state, stopped_list);
|
|
|
c563b9 |
free(stopped_list);
|
|
|
c563b9 |
stopped_list_len = 0;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
diff --git a/lib/pengine/native.c b/lib/pengine/native.c
|
|
|
c563b9 |
index 6f27d7b..193be17 100644
|
|
|
c563b9 |
--- a/lib/pengine/native.c
|
|
|
c563b9 |
+++ b/lib/pengine/native.c
|
|
|
c563b9 |
@@ -1320,12 +1320,12 @@ pe__rscs_brief_output(pcmk__output_t *out, GListPtr rsc_list, long options, gboo
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (print_all) {
|
|
|
c563b9 |
- out->list_item(out, NULL, " %d/%d\t(%s):\tActive %s",
|
|
|
c563b9 |
+ out->list_item(out, NULL, "%d/%d\t(%s):\tActive %s",
|
|
|
c563b9 |
*active_counter,
|
|
|
c563b9 |
rsc_counter ? *rsc_counter : 0, type,
|
|
|
c563b9 |
(*active_counter > 0) && node_name ? node_name : "");
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- out->list_item(out, NULL, " %d\t(%s):\tActive %s",
|
|
|
c563b9 |
+ out->list_item(out, NULL, "%d\t(%s):\tActive %s",
|
|
|
c563b9 |
*active_counter, type,
|
|
|
c563b9 |
(*active_counter > 0) && node_name ? node_name : "");
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -1334,7 +1334,7 @@ pe__rscs_brief_output(pcmk__output_t *out, GListPtr rsc_list, long options, gboo
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
if (print_all && active_counter_all == 0) {
|
|
|
c563b9 |
- out->list_item(out, NULL, " %d/%d\t(%s):\tActive",
|
|
|
c563b9 |
+ out->list_item(out, NULL, "%d/%d\t(%s):\tActive",
|
|
|
c563b9 |
active_counter_all,
|
|
|
c563b9 |
rsc_counter ? *rsc_counter : 0, type);
|
|
|
c563b9 |
rc = pcmk_rc_ok;
|
|
|
c563b9 |
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
|
|
|
c563b9 |
index a7118a4..e26604e 100644
|
|
|
c563b9 |
--- a/lib/pengine/pe_output.c
|
|
|
c563b9 |
+++ b/lib/pengine/pe_output.c
|
|
|
c563b9 |
@@ -1890,13 +1890,13 @@ pe__ticket_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
if (ticket->last_granted > -1) {
|
|
|
c563b9 |
char *time = pcmk_format_named_time("last-granted", ticket->last_granted);
|
|
|
c563b9 |
- out->list_item(out, ticket->id, "\t%s%s %s",
|
|
|
c563b9 |
+ out->list_item(out, ticket->id, "%s%s %s",
|
|
|
c563b9 |
ticket->granted ? "granted" : "revoked",
|
|
|
c563b9 |
ticket->standby ? " [standby]" : "",
|
|
|
c563b9 |
time);
|
|
|
c563b9 |
free(time);
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
- out->list_item(out, ticket->id, "\t%s%s",
|
|
|
c563b9 |
+ out->list_item(out, ticket->id, "%s%s",
|
|
|
c563b9 |
ticket->granted ? "granted" : "revoked",
|
|
|
c563b9 |
ticket->standby ? " [standby]" : "");
|
|
|
c563b9 |
}
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 3db514eed9764d6947f114dfe870a88d082db8a3 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Mon, 9 Nov 2020 13:53:23 -0500
|
|
|
c563b9 |
Subject: [PATCH 5/9] Fix: libs, tools: Don't use fprintf in formatted output.
|
|
|
c563b9 |
|
|
|
c563b9 |
That's what out->info is for. And then having done this, the special
|
|
|
c563b9 |
console-specific version of the maint-mode message can go away. It's
|
|
|
c563b9 |
now exactly the same as the text version.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/pengine/pe_output.c | 10 ++++------
|
|
|
c563b9 |
tools/crm_mon_curses.c | 28 +---------------------------
|
|
|
c563b9 |
2 files changed, 5 insertions(+), 33 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
|
|
|
c563b9 |
index e26604e..1b57f64 100644
|
|
|
c563b9 |
--- a/lib/pengine/pe_output.c
|
|
|
c563b9 |
+++ b/lib/pengine/pe_output.c
|
|
|
c563b9 |
@@ -694,14 +694,12 @@ pe__cluster_maint_mode_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
unsigned long long flags = va_arg(args, unsigned long long);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (pcmk_is_set(flags, pe_flag_maintenance_mode)) {
|
|
|
c563b9 |
- fprintf(out->dest, "\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
- fprintf(out->dest, "\n The cluster will not attempt to start, stop or recover services");
|
|
|
c563b9 |
- fprintf(out->dest, "\n");
|
|
|
c563b9 |
+ out->info(out, "\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
+ out->info(out, " The cluster will not attempt to start, stop or recover services");
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
} else if (pcmk_is_set(flags, pe_flag_stop_everything)) {
|
|
|
c563b9 |
- fprintf(out->dest, "\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
- fprintf(out->dest, "\n The cluster will keep all resources stopped");
|
|
|
c563b9 |
- fprintf(out->dest, "\n");
|
|
|
c563b9 |
+ out->info(out, "\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
+ out->info(out, " The cluster will keep all resources stopped");
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
} else {
|
|
|
c563b9 |
return pcmk_rc_no_output;
|
|
|
c563b9 |
diff --git a/tools/crm_mon_curses.c b/tools/crm_mon_curses.c
|
|
|
c563b9 |
index 869c7f3..ae22198 100644
|
|
|
c563b9 |
--- a/tools/crm_mon_curses.c
|
|
|
c563b9 |
+++ b/tools/crm_mon_curses.c
|
|
|
c563b9 |
@@ -365,32 +365,6 @@ stonith_event_console(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("maint-mode", "unsigned long long int")
|
|
|
c563b9 |
-static int
|
|
|
c563b9 |
-cluster_maint_mode_console(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
- unsigned long long flags = va_arg(args, unsigned long long);
|
|
|
c563b9 |
-
|
|
|
c563b9 |
- int rc;
|
|
|
c563b9 |
-
|
|
|
c563b9 |
- if (pcmk_is_set(flags, pe_flag_maintenance_mode)) {
|
|
|
c563b9 |
- printw("\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
- printw("\n The cluster will not attempt to start, stop or recover services");
|
|
|
c563b9 |
- printw("\n");
|
|
|
c563b9 |
- rc = pcmk_rc_ok;
|
|
|
c563b9 |
- } else if (pcmk_is_set(flags, pe_flag_stop_everything)) {
|
|
|
c563b9 |
- printw("\n *** Resource management is DISABLED ***");
|
|
|
c563b9 |
- printw("\n The cluster will keep all resources stopped");
|
|
|
c563b9 |
- printw("\n");
|
|
|
c563b9 |
- rc = pcmk_rc_ok;
|
|
|
c563b9 |
- } else {
|
|
|
c563b9 |
- rc = pcmk_rc_no_output;
|
|
|
c563b9 |
- }
|
|
|
c563b9 |
-
|
|
|
c563b9 |
- clrtoeol();
|
|
|
c563b9 |
- refresh();
|
|
|
c563b9 |
- return rc;
|
|
|
c563b9 |
-}
|
|
|
c563b9 |
-
|
|
|
c563b9 |
static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "ban", "console", pe__ban_text },
|
|
|
c563b9 |
{ "bundle", "console", pe__bundle_text },
|
|
|
c563b9 |
@@ -406,7 +380,7 @@ static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "fencing-history", "console", stonith__history },
|
|
|
c563b9 |
{ "full-fencing-history", "console", stonith__full_history },
|
|
|
c563b9 |
{ "group", "console", pe__group_text },
|
|
|
c563b9 |
- { "maint-mode", "console", cluster_maint_mode_console },
|
|
|
c563b9 |
+ { "maint-mode", "console", pe__cluster_maint_mode_text },
|
|
|
c563b9 |
{ "node", "console", pe__node_text },
|
|
|
c563b9 |
{ "node-attribute", "console", pe__node_attribute_text },
|
|
|
c563b9 |
{ "node-list", "console", pe__node_list_text },
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From a7bbe968df5617c78e78495406f95f9d258834f1 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Thu, 19 Nov 2020 16:04:09 -0500
|
|
|
c563b9 |
Subject: [PATCH 6/9] Fix: libstonithd: Use subprocess_output directly.
|
|
|
c563b9 |
|
|
|
c563b9 |
stonith__validate_agent_text was using puts, when it should really just
|
|
|
c563b9 |
be using subprocess_output. The effect is the same but we should be
|
|
|
c563b9 |
using the same functions everywhere.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/fencing/st_output.c | 9 +--------
|
|
|
c563b9 |
1 file changed, 1 insertion(+), 8 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/fencing/st_output.c b/lib/fencing/st_output.c
|
|
|
c563b9 |
index 7c3ccef..145dd14 100644
|
|
|
c563b9 |
--- a/lib/fencing/st_output.c
|
|
|
c563b9 |
+++ b/lib/fencing/st_output.c
|
|
|
c563b9 |
@@ -403,14 +403,7 @@ stonith__validate_agent_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
rc ? "failed" : "succeeded");
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
- if (output) {
|
|
|
c563b9 |
- puts(output);
|
|
|
c563b9 |
- }
|
|
|
c563b9 |
-
|
|
|
c563b9 |
- if (error_output) {
|
|
|
c563b9 |
- puts(error_output);
|
|
|
c563b9 |
- }
|
|
|
c563b9 |
-
|
|
|
c563b9 |
+ out->subprocess_output(out, rc, output, error_output);
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 39062beb1f243078bab71cc26af44019927da112 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Fri, 20 Nov 2020 16:22:12 -0500
|
|
|
c563b9 |
Subject: [PATCH 7/9] Fix: libs, tools: Add -list to certain formatted output
|
|
|
c563b9 |
message names.
|
|
|
c563b9 |
|
|
|
c563b9 |
Basically, if the message creates its own list, the name should end in
|
|
|
c563b9 |
-list. This is a hint to the caller that they do not need to add an
|
|
|
c563b9 |
extra layer of lists. I've further changed the names of these messages
|
|
|
c563b9 |
to be a little shorter, too.
|
|
|
c563b9 |
|
|
|
c563b9 |
Note that some messages (the resource variants most obviously) create
|
|
|
c563b9 |
their own list but don't have -list in the name. Here, the list is more
|
|
|
c563b9 |
for organizational purposes rather than indicating that it contains
|
|
|
c563b9 |
items.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/fencing/st_output.c | 20 +++++++--------
|
|
|
c563b9 |
tools/crm_mon_curses.c | 8 +++---
|
|
|
c563b9 |
tools/crm_mon_print.c | 14 +++++-----
|
|
|
c563b9 |
tools/crm_resource.c | 8 +++---
|
|
|
c563b9 |
tools/crm_resource_print.c | 61 ++++++++++++++++++++++----------------------
|
|
|
c563b9 |
tools/crm_resource_runtime.c | 2 +-
|
|
|
c563b9 |
6 files changed, 56 insertions(+), 57 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/fencing/st_output.c b/lib/fencing/st_output.c
|
|
|
c563b9 |
index 145dd14..e1f4830 100644
|
|
|
c563b9 |
--- a/lib/fencing/st_output.c
|
|
|
c563b9 |
+++ b/lib/fencing/st_output.c
|
|
|
c563b9 |
@@ -30,7 +30,7 @@ time_t_string(time_t when) {
|
|
|
c563b9 |
return buf;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("failed-fencing-history", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("failed-fencing-list", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__failed_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
@@ -58,7 +58,7 @@ stonith__failed_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("fencing-history", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("fencing-list", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
@@ -84,7 +84,7 @@ stonith__history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("full-fencing-list", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__full_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
crm_exit_t history_rc G_GNUC_UNUSED = va_arg(args, crm_exit_t);
|
|
|
c563b9 |
@@ -109,7 +109,7 @@ stonith__full_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("full-fencing-history", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("full-fencing-list", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__full_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
crm_exit_t history_rc = va_arg(args, crm_exit_t);
|
|
|
c563b9 |
@@ -198,7 +198,7 @@ stonith__last_fenced_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("pending-fencing-actions", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("pending-fencing-list", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
int
|
|
|
c563b9 |
stonith__pending_actions(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
@@ -433,15 +433,15 @@ stonith__validate_agent_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
- { "failed-fencing-history", "default", stonith__failed_history },
|
|
|
c563b9 |
- { "fencing-history", "default", stonith__history },
|
|
|
c563b9 |
- { "full-fencing-history", "default", stonith__full_history },
|
|
|
c563b9 |
- { "full-fencing-history", "xml", stonith__full_history_xml },
|
|
|
c563b9 |
+ { "failed-fencing-list", "default", stonith__failed_history },
|
|
|
c563b9 |
+ { "fencing-list", "default", stonith__history },
|
|
|
c563b9 |
+ { "full-fencing-list", "default", stonith__full_history },
|
|
|
c563b9 |
+ { "full-fencing-list", "xml", stonith__full_history_xml },
|
|
|
c563b9 |
{ "last-fenced", "html", stonith__last_fenced_html },
|
|
|
c563b9 |
{ "last-fenced", "log", stonith__last_fenced_text },
|
|
|
c563b9 |
{ "last-fenced", "text", stonith__last_fenced_text },
|
|
|
c563b9 |
{ "last-fenced", "xml", stonith__last_fenced_xml },
|
|
|
c563b9 |
- { "pending-fencing-actions", "default", stonith__pending_actions },
|
|
|
c563b9 |
+ { "pending-fencing-list", "default", stonith__pending_actions },
|
|
|
c563b9 |
{ "stonith-event", "html", stonith__event_html },
|
|
|
c563b9 |
{ "stonith-event", "log", stonith__event_text },
|
|
|
c563b9 |
{ "stonith-event", "text", stonith__event_text },
|
|
|
c563b9 |
diff --git a/tools/crm_mon_curses.c b/tools/crm_mon_curses.c
|
|
|
c563b9 |
index ae22198..5c79dd2 100644
|
|
|
c563b9 |
--- a/tools/crm_mon_curses.c
|
|
|
c563b9 |
+++ b/tools/crm_mon_curses.c
|
|
|
c563b9 |
@@ -376,16 +376,16 @@ static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "cluster-summary", "console", pe__cluster_summary },
|
|
|
c563b9 |
{ "cluster-times", "console", pe__cluster_times_text },
|
|
|
c563b9 |
{ "failed-action", "console", pe__failed_action_text },
|
|
|
c563b9 |
- { "failed-fencing-history", "console", stonith__failed_history },
|
|
|
c563b9 |
- { "fencing-history", "console", stonith__history },
|
|
|
c563b9 |
- { "full-fencing-history", "console", stonith__full_history },
|
|
|
c563b9 |
+ { "failed-fencing-list", "console", stonith__failed_history },
|
|
|
c563b9 |
+ { "fencing-list", "console", stonith__history },
|
|
|
c563b9 |
+ { "full-fencing-list", "console", stonith__full_history },
|
|
|
c563b9 |
{ "group", "console", pe__group_text },
|
|
|
c563b9 |
{ "maint-mode", "console", pe__cluster_maint_mode_text },
|
|
|
c563b9 |
{ "node", "console", pe__node_text },
|
|
|
c563b9 |
{ "node-attribute", "console", pe__node_attribute_text },
|
|
|
c563b9 |
{ "node-list", "console", pe__node_list_text },
|
|
|
c563b9 |
{ "op-history", "console", pe__op_history_text },
|
|
|
c563b9 |
- { "pending-fencing-actions", "console", stonith__pending_actions },
|
|
|
c563b9 |
+ { "pending-fencing-list", "console", stonith__pending_actions },
|
|
|
c563b9 |
{ "primitive", "console", pe__resource_text },
|
|
|
c563b9 |
{ "resource-history", "console", pe__resource_history_text },
|
|
|
c563b9 |
{ "stonith-event", "console", stonith_event_console },
|
|
|
c563b9 |
diff --git a/tools/crm_mon_print.c b/tools/crm_mon_print.c
|
|
|
c563b9 |
index ce3e47c..06840b7 100644
|
|
|
c563b9 |
--- a/tools/crm_mon_print.c
|
|
|
c563b9 |
+++ b/tools/crm_mon_print.c
|
|
|
c563b9 |
@@ -735,7 +735,7 @@ print_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
GINT_TO_POINTER(st_failed));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- CHECK_RC(rc, out->message(out, "failed-fencing-history", stonith_history, unames,
|
|
|
c563b9 |
+ CHECK_RC(rc, out->message(out, "failed-fencing-list", stonith_history, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
rc == pcmk_rc_ok));
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -759,7 +759,7 @@ print_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
GINT_TO_POINTER(st_failed));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- CHECK_RC(rc, out->message(out, "fencing-history", hp, unames,
|
|
|
c563b9 |
+ CHECK_RC(rc, out->message(out, "fencing-list", hp, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
rc == pcmk_rc_ok));
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -767,7 +767,7 @@ print_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
stonith_history_t *hp = stonith__first_matching_event(stonith_history, stonith__event_state_pending, NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- CHECK_RC(rc, out->message(out, "pending-fencing-actions", hp, unames,
|
|
|
c563b9 |
+ CHECK_RC(rc, out->message(out, "pending-fencing-list", hp, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
rc == pcmk_rc_ok));
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -853,7 +853,7 @@ print_xml_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
if (pcmk_is_set(show, mon_show_fencing_all)
|
|
|
c563b9 |
&& pcmk_is_set(mon_ops, mon_op_fence_history)) {
|
|
|
c563b9 |
|
|
|
c563b9 |
- out->message(out, "full-fencing-history", history_rc, stonith_history,
|
|
|
c563b9 |
+ out->message(out, "full-fencing-list", history_rc, stonith_history,
|
|
|
c563b9 |
unames, pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
FALSE);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -954,7 +954,7 @@ print_html_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
GINT_TO_POINTER(st_failed));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- out->message(out, "failed-fencing-history", stonith_history, unames,
|
|
|
c563b9 |
+ out->message(out, "failed-fencing-list", stonith_history, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history), FALSE);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -966,7 +966,7 @@ print_html_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
GINT_TO_POINTER(st_failed));
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- out->message(out, "fencing-history", hp, unames,
|
|
|
c563b9 |
+ out->message(out, "fencing-list", hp, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
FALSE);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -974,7 +974,7 @@ print_html_status(pcmk__output_t *out, pe_working_set_t *data_set,
|
|
|
c563b9 |
stonith_history_t *hp = stonith__first_matching_event(stonith_history, stonith__event_state_pending, NULL);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (hp) {
|
|
|
c563b9 |
- out->message(out, "pending-fencing-actions", hp, unames,
|
|
|
c563b9 |
+ out->message(out, "pending-fencing-list", hp, unames,
|
|
|
c563b9 |
pcmk_is_set(mon_ops, mon_op_fence_full_history),
|
|
|
c563b9 |
FALSE);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
|
|
|
c563b9 |
index 2c62ff6..95c72fc 100644
|
|
|
c563b9 |
--- a/tools/crm_resource.c
|
|
|
c563b9 |
+++ b/tools/crm_resource.c
|
|
|
c563b9 |
@@ -1816,7 +1816,7 @@ main(int argc, char **argv)
|
|
|
c563b9 |
|
|
|
c563b9 |
case cmd_locate: {
|
|
|
c563b9 |
GListPtr resources = cli_resource_search(out, rsc, options.rsc_id, data_set);
|
|
|
c563b9 |
- rc = out->message(out, "resource-search", resources, rsc, options.rsc_id);
|
|
|
c563b9 |
+ rc = out->message(out, "resource-search-list", resources, rsc, options.rsc_id);
|
|
|
c563b9 |
break;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1839,7 +1839,7 @@ main(int argc, char **argv)
|
|
|
c563b9 |
goto done;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
}
|
|
|
c563b9 |
- out->message(out, "resource-why", cib_conn, data_set->resources, rsc, dest);
|
|
|
c563b9 |
+ out->message(out, "resource-reasons-list", cib_conn, data_set->resources, rsc, dest);
|
|
|
c563b9 |
rc = pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
break;
|
|
|
c563b9 |
@@ -1879,7 +1879,7 @@ main(int argc, char **argv)
|
|
|
c563b9 |
break;
|
|
|
c563b9 |
|
|
|
c563b9 |
case cmd_get_property:
|
|
|
c563b9 |
- rc = out->message(out, "property", rsc, options.prop_name);
|
|
|
c563b9 |
+ rc = out->message(out, "property-list", rsc, options.prop_name);
|
|
|
c563b9 |
if (rc == pcmk_rc_no_output) {
|
|
|
c563b9 |
rc = ENXIO;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
@@ -1916,7 +1916,7 @@ main(int argc, char **argv)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
crm_debug("Looking up %s in %s", options.prop_name, rsc->id);
|
|
|
c563b9 |
- rc = out->message(out, "attribute", rsc, options.prop_name, params);
|
|
|
c563b9 |
+ rc = out->message(out, "attribute-list", rsc, options.prop_name, params);
|
|
|
c563b9 |
g_hash_table_destroy(params);
|
|
|
c563b9 |
break;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
diff --git a/tools/crm_resource_print.c b/tools/crm_resource_print.c
|
|
|
c563b9 |
index 4cb78b5..89d6172 100644
|
|
|
c563b9 |
--- a/tools/crm_resource_print.c
|
|
|
c563b9 |
+++ b/tools/crm_resource_print.c
|
|
|
c563b9 |
@@ -127,9 +127,9 @@ cli_resource_print(pcmk__output_t *out, pe_resource_t *rsc,
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("attribute", "pe_resource_t *", "char *", "GHashTable *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("attribute-list", "pe_resource_t *", "char *", "GHashTable *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-attribute_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+attribute_list_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
char *attr = va_arg(args, char *);
|
|
|
c563b9 |
GHashTable *params = va_arg(args, GHashTable *);
|
|
|
c563b9 |
@@ -147,9 +147,9 @@ attribute_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("attribute", "pe_resource_t *", "char *", "GHashTable *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("attribute-list", "pe_resource_t *", "char *", "GHashTable *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-attribute_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+attribute_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
char *attr = va_arg(args, char *);
|
|
|
c563b9 |
GHashTable *params = va_arg(args, GHashTable *);
|
|
|
c563b9 |
@@ -165,9 +165,9 @@ attribute_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("property", "pe_resource_t *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("property-list", "pe_resource_t *", "char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-property_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+property_list_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
char *attr = va_arg(args, char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -182,9 +182,9 @@ property_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("property", "pe_resource_t *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("property-list", "pe_resource_t *", "char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-property_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+property_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
char *attr = va_arg(args, char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -197,9 +197,9 @@ property_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-check", "resource_checks_t *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-check-list", "resource_checks_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_check_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+resource_check_list_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
resource_checks_t *checks = va_arg(args, resource_checks_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe_resource_t *parent = uber_parent(checks->rsc);
|
|
|
c563b9 |
@@ -239,9 +239,9 @@ resource_check_default(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-check", "resource_checks_t *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-check-list", "resource_checks_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_check_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+resource_check_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
resource_checks_t *checks = va_arg(args, resource_checks_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pe_resource_t *parent = uber_parent(checks->rsc);
|
|
|
c563b9 |
@@ -270,9 +270,9 @@ resource_check_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-search", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-search-list", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_search_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
+resource_search_list_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
@@ -315,10 +315,9 @@ resource_search_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return rc;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-search", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-search-list", "GList *", "pe_resource_t *", "gchar *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_search_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
+resource_search_list_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
@@ -340,10 +339,10 @@ resource_search_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-reasons-list", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
"pe_node_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
+resource_reasons_list_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
cib_t *cib_conn = va_arg(args, cib_t *);
|
|
|
c563b9 |
GList *resources = va_arg(args, GList *);
|
|
|
c563b9 |
@@ -423,10 +422,10 @@ resource_why_default(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("resource-why", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("resource-reasons-list", "cib_t *", "GList *", "pe_resource_t *",
|
|
|
c563b9 |
"pe_node_t *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
-resource_why_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
+resource_reasons_list_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
cib_t *cib_conn = va_arg(args, cib_t *);
|
|
|
c563b9 |
GList *resources = va_arg(args, GList *);
|
|
|
c563b9 |
@@ -554,16 +553,16 @@ resource_names(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
- { "attribute", "default", attribute_default },
|
|
|
c563b9 |
- { "attribute", "text", attribute_text },
|
|
|
c563b9 |
- { "property", "default", property_default },
|
|
|
c563b9 |
- { "property", "text", property_text },
|
|
|
c563b9 |
- { "resource-check", "default", resource_check_default },
|
|
|
c563b9 |
- { "resource-check", "xml", resource_check_xml },
|
|
|
c563b9 |
- { "resource-search", "default", resource_search_default },
|
|
|
c563b9 |
- { "resource-search", "xml", resource_search_xml },
|
|
|
c563b9 |
- { "resource-why", "default", resource_why_default },
|
|
|
c563b9 |
- { "resource-why", "xml", resource_why_xml },
|
|
|
c563b9 |
+ { "attribute-list", "default", attribute_list_default },
|
|
|
c563b9 |
+ { "attribute-list", "text", attribute_list_text },
|
|
|
c563b9 |
+ { "property-list", "default", property_list_default },
|
|
|
c563b9 |
+ { "property-list", "text", property_list_text },
|
|
|
c563b9 |
+ { "resource-check-list", "default", resource_check_list_default },
|
|
|
c563b9 |
+ { "resource-check-list", "xml", resource_check_list_xml },
|
|
|
c563b9 |
+ { "resource-search-list", "default", resource_search_list_default },
|
|
|
c563b9 |
+ { "resource-search-list", "xml", resource_search_list_xml },
|
|
|
c563b9 |
+ { "resource-reasons-list", "default", resource_reasons_list_default },
|
|
|
c563b9 |
+ { "resource-reasons-list", "xml", resource_reasons_list_xml },
|
|
|
c563b9 |
{ "resource-names-list", "default", resource_names },
|
|
|
c563b9 |
|
|
|
c563b9 |
{ NULL, NULL, NULL }
|
|
|
c563b9 |
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
|
|
|
c563b9 |
index bbd8bc1..3a9feac 100644
|
|
|
c563b9 |
--- a/tools/crm_resource_runtime.c
|
|
|
c563b9 |
+++ b/tools/crm_resource_runtime.c
|
|
|
c563b9 |
@@ -900,7 +900,7 @@ cli_resource_check(pcmk__output_t *out, cib_t * cib_conn, pe_resource_t *rsc)
|
|
|
c563b9 |
checks = cli_check_resource(rsc, role_s, managed);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (checks->flags != 0 || checks->lock_node != NULL) {
|
|
|
c563b9 |
- rc = out->message(out, "resource-check", checks);
|
|
|
c563b9 |
+ rc = out->message(out, "resource-check-list", checks);
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
free(role_s);
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From d7322d1c2802c2d65a82a19b2513b5769b25dc30 Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Fri, 20 Nov 2020 16:23:14 -0500
|
|
|
c563b9 |
Subject: [PATCH 8/9] Fix: libpacemaker: Fix typing on crmadmin formatted
|
|
|
c563b9 |
output messages.
|
|
|
c563b9 |
|
|
|
c563b9 |
Mostly this is just changing char * into const char *, though the
|
|
|
c563b9 |
crm_node_list one is pretty important.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
lib/pacemaker/pcmk_output.c | 64 ++++++++++++++++++++++-----------------------
|
|
|
c563b9 |
1 file changed, 32 insertions(+), 32 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/lib/pacemaker/pcmk_output.c b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
index deb1fe5..5c54204 100644
|
|
|
c563b9 |
--- a/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
+++ b/lib/pacemaker/pcmk_output.c
|
|
|
c563b9 |
@@ -357,14 +357,14 @@ stacks_and_constraints_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("health", "char *", "char *", "char *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("health", "const char *", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
health_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *sys_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *host_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *fsa_state = va_arg(args, char *);
|
|
|
c563b9 |
- char *result = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *sys_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *host_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *fsa_state = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *result = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!out->is_quiet(out)) {
|
|
|
c563b9 |
out->info(out, "Status of %s@%s: %s (%s)", crm_str(sys_from),
|
|
|
c563b9 |
@@ -376,14 +376,14 @@ health_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("health", "char *", "char *", "char *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("health", "const char *", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
health_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *sys_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *host_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *fsa_state = va_arg(args, char *);
|
|
|
c563b9 |
- char *result = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *sys_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *host_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *fsa_state = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *result = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_create_xml_node(out, crm_str(sys_from),
|
|
|
c563b9 |
"node_name", crm_str(host_from),
|
|
|
c563b9 |
@@ -393,13 +393,13 @@ health_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("pacemakerd-health", "char *", "char *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("pacemakerd-health", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
pacemakerd_health_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *sys_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *state = va_arg(args, char *);
|
|
|
c563b9 |
- char *last_updated = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *sys_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *state = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *last_updated = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!out->is_quiet(out)) {
|
|
|
c563b9 |
out->info(out, "Status of %s: '%s' %s %s", crm_str(sys_from),
|
|
|
c563b9 |
@@ -412,13 +412,13 @@ pacemakerd_health_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("pacemakerd-health", "char *", "char *", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("pacemakerd-health", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
pacemakerd_health_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *sys_from = va_arg(args, char *);
|
|
|
c563b9 |
- char *state = va_arg(args, char *);
|
|
|
c563b9 |
- char *last_updated = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *sys_from = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *state = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *last_updated = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_create_xml_node(out, crm_str(sys_from),
|
|
|
c563b9 |
"state", crm_str(state),
|
|
|
c563b9 |
@@ -427,11 +427,11 @@ pacemakerd_health_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("dc", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("dc", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
dc_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *dc = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *dc = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (!out->is_quiet(out)) {
|
|
|
c563b9 |
out->info(out, "Designated Controller is: %s", crm_str(dc));
|
|
|
c563b9 |
@@ -442,11 +442,11 @@ dc_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("dc", "char *")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("dc", "const char *")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
dc_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *dc = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *dc = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_create_xml_node(out, "dc",
|
|
|
c563b9 |
"node_name", crm_str(dc),
|
|
|
c563b9 |
@@ -455,16 +455,16 @@ dc_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("crmadmin-node-list", "pcmk__output_t *", "xmlNodePtr")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("crmadmin-node-list", "xmlNodePtr", "gboolean")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
crmadmin_node_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
xmlNodePtr xml_node = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
+ gboolean BASH_EXPORT = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
int found = 0;
|
|
|
c563b9 |
xmlNode *node = NULL;
|
|
|
c563b9 |
xmlNode *nodes = get_object_root(XML_CIB_TAG_NODES, xml_node);
|
|
|
c563b9 |
- gboolean BASH_EXPORT = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
out->begin_list(out, NULL, NULL, "nodes");
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -490,13 +490,13 @@ crmadmin_node_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("crmadmin-node", "char *", "char *", "char *", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("crmadmin-node", "const char *", "const char *", "const char *", "gboolean")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
crmadmin_node_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *type = va_arg(args, char *);
|
|
|
c563b9 |
- char *name = va_arg(args, char *);
|
|
|
c563b9 |
- char *id = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *type = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *name = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *id = va_arg(args, const char *);
|
|
|
c563b9 |
gboolean BASH_EXPORT = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (BASH_EXPORT) {
|
|
|
c563b9 |
@@ -509,13 +509,13 @@ crmadmin_node_text(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
return pcmk_rc_ok;
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-PCMK__OUTPUT_ARGS("crmadmin-node", "char *", "char *", "char *", "gboolean")
|
|
|
c563b9 |
+PCMK__OUTPUT_ARGS("crmadmin-node", "const char *", "const char *", "const char *", "gboolean")
|
|
|
c563b9 |
static int
|
|
|
c563b9 |
crmadmin_node_xml(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
- char *type = va_arg(args, char *);
|
|
|
c563b9 |
- char *name = va_arg(args, char *);
|
|
|
c563b9 |
- char *id = va_arg(args, char *);
|
|
|
c563b9 |
+ const char *type = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *name = va_arg(args, const char *);
|
|
|
c563b9 |
+ const char *id = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_create_xml_node(out, "node",
|
|
|
c563b9 |
"type", type ? type : "member",
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|
|
|
c563b9 |
|
|
|
c563b9 |
From 1a123a8d8a8ec22b6166b5cdebcfdfe6b05bcc4e Mon Sep 17 00:00:00 2001
|
|
|
c563b9 |
From: Chris Lumens <clumens@redhat.com>
|
|
|
c563b9 |
Date: Fri, 20 Nov 2020 16:23:39 -0500
|
|
|
c563b9 |
Subject: [PATCH 9/9] Fix: libs: Decrease the number of visible formatted
|
|
|
c563b9 |
output functions.
|
|
|
c563b9 |
|
|
|
c563b9 |
The only ones that need to be exported are the ones that crm_mon needs
|
|
|
c563b9 |
to reference for its output. All the others can be static and only
|
|
|
c563b9 |
accessed indirectly through calling out->message.
|
|
|
c563b9 |
|
|
|
c563b9 |
And then remove the prefixes from these newly static functions. This
|
|
|
c563b9 |
could potentially be a little confusing if the text version is public
|
|
|
c563b9 |
(and therefore has the, say, pe__ prefix) while the xml version is
|
|
|
c563b9 |
hidden and is lacking that suffix. But I think it'll be okay.
|
|
|
c563b9 |
---
|
|
|
c563b9 |
include/crm/fencing/internal.h | 11 +--
|
|
|
c563b9 |
include/crm/pengine/internal.h | 54 ++++----------
|
|
|
c563b9 |
lib/fencing/st_output.c | 66 ++++++++---------
|
|
|
c563b9 |
lib/pengine/pe_output.c | 161 +++++++++++++++++++++--------------------
|
|
|
c563b9 |
4 files changed, 129 insertions(+), 163 deletions(-)
|
|
|
c563b9 |
|
|
|
c563b9 |
diff --git a/include/crm/fencing/internal.h b/include/crm/fencing/internal.h
|
|
|
c563b9 |
index 391ab72..dfb1d64 100644
|
|
|
c563b9 |
--- a/include/crm/fencing/internal.h
|
|
|
c563b9 |
+++ b/include/crm/fencing/internal.h
|
|
|
c563b9 |
@@ -185,20 +185,11 @@ int stonith__rhcs_validate(stonith_t *st, int call_options, const char *target,
|
|
|
c563b9 |
const char *agent, GHashTable *params, const char *host_arg,
|
|
|
c563b9 |
int timeout, char **output, char **error_output);
|
|
|
c563b9 |
|
|
|
c563b9 |
+/* Exported for crm_mon to reference */
|
|
|
c563b9 |
int stonith__failed_history(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int stonith__history(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int stonith__full_history(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__full_history_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__last_fenced_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__last_fenced_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__last_fenced_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int stonith__pending_actions(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__event_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__event_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__event_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__validate_agent_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__validate_agent_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int stonith__validate_agent_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
|
|
|
c563b9 |
stonith_history_t *stonith__first_matching_event(stonith_history_t *history,
|
|
|
c563b9 |
bool (*matching_fn)(stonith_history_t *, void *),
|
|
|
c563b9 |
diff --git a/include/crm/pengine/internal.h b/include/crm/pengine/internal.h
|
|
|
c563b9 |
index c4b28cc..89e17b8 100644
|
|
|
c563b9 |
--- a/include/crm/pengine/internal.h
|
|
|
c563b9 |
+++ b/include/crm/pengine/internal.h
|
|
|
c563b9 |
@@ -256,34 +256,9 @@ pe__rsc_bool_str(pe_resource_t *rsc, uint64_t rsc_flag)
|
|
|
c563b9 |
return pcmk__btoa(pcmk_is_set(rsc->flags, rsc_flag));
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
-int pe__ban_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__ban_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__ban_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__clone_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__clone_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__clone_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_counts_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_counts_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_counts_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_dc_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_dc_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_dc_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_maint_mode_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_maint_mode_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_options_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_options_log(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_options_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_options_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_stack_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_stack_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_stack_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_summary(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_summary_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_times_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_times_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__cluster_times_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__failed_action_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__failed_action_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__group_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__group_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__group_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
@@ -293,26 +268,25 @@ int pe__bundle_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__node_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__node_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__node_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_and_op(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_and_op_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_attribute_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__resource_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__resource_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__resource_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+
|
|
|
c563b9 |
+/* Exported for crm_mon to reference */
|
|
|
c563b9 |
+int pe__ban_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_counts_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_dc_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_maint_mode_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_options_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_stack_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_summary(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__cluster_times_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
+int pe__failed_action_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__node_attribute_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_attribute_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_list_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__node_list_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__node_list_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__op_history_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__op_history_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_config(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__resource_history_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_history_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__resource_list(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__ticket_html(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
int pe__ticket_text(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
-int pe__ticket_xml(pcmk__output_t *out, va_list args);
|
|
|
c563b9 |
|
|
|
c563b9 |
void native_free(pe_resource_t * rsc);
|
|
|
c563b9 |
void group_free(pe_resource_t * rsc);
|
|
|
c563b9 |
diff --git a/lib/fencing/st_output.c b/lib/fencing/st_output.c
|
|
|
c563b9 |
index e1f4830..f48fd55 100644
|
|
|
c563b9 |
--- a/lib/fencing/st_output.c
|
|
|
c563b9 |
+++ b/lib/fencing/st_output.c
|
|
|
c563b9 |
@@ -110,8 +110,8 @@ stonith__full_history(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("full-fencing-list", "crm_exit_t", "stonith_history_t *", "GList *", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__full_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+full_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
crm_exit_t history_rc = va_arg(args, crm_exit_t);
|
|
|
c563b9 |
stonith_history_t *history = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
@@ -147,8 +147,8 @@ stonith__full_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("last-fenced", "const char *", "time_t")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__last_fenced_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+last_fenced_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *target = va_arg(args, const char *);
|
|
|
c563b9 |
time_t when = va_arg(args, time_t);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -163,8 +163,8 @@ stonith__last_fenced_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("last-fenced", "const char *", "time_t")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__last_fenced_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+last_fenced_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *target = va_arg(args, const char *);
|
|
|
c563b9 |
time_t when = va_arg(args, time_t);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -178,8 +178,8 @@ stonith__last_fenced_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("last-fenced", "const char *", "time_t")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__last_fenced_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+last_fenced_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *target = va_arg(args, const char *);
|
|
|
c563b9 |
time_t when = va_arg(args, time_t);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -228,8 +228,8 @@ stonith__pending_actions(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("stonith-event", "stonith_history_t *", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__event_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+stonith_event_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *event = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean later_succeeded = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -276,8 +276,8 @@ stonith__event_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("stonith-event", "stonith_history_t *", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__event_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+stonith_event_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *event = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
gboolean full_history = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean later_succeeded = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -314,8 +314,8 @@ stonith__event_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("stonith-event", "stonith_history_t *", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__event_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+stonith_event_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
stonith_history_t *event = va_arg(args, stonith_history_t *);
|
|
|
c563b9 |
gboolean full_history G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean later_succeeded G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -362,8 +362,8 @@ stonith__event_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("validate", "const char *", "const char *", "char *", "char *", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__validate_agent_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+validate_agent_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *agent = va_arg(args, const char *);
|
|
|
c563b9 |
const char *device = va_arg(args, const char *);
|
|
|
c563b9 |
char *output = va_arg(args, char *);
|
|
|
c563b9 |
@@ -387,8 +387,8 @@ stonith__validate_agent_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("validate", "const char *", "const char *", "char *", "char *", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__validate_agent_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+validate_agent_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *agent = va_arg(args, const char *);
|
|
|
c563b9 |
const char *device = va_arg(args, const char *);
|
|
|
c563b9 |
char *output = va_arg(args, char *);
|
|
|
c563b9 |
@@ -408,8 +408,8 @@ stonith__validate_agent_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("validate", "const char *", "const char *", "char *", "char *", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-stonith__validate_agent_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+validate_agent_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *agent = va_arg(args, const char *);
|
|
|
c563b9 |
const char *device = va_arg(args, const char *);
|
|
|
c563b9 |
char *output = va_arg(args, char *);
|
|
|
c563b9 |
@@ -436,20 +436,20 @@ static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "failed-fencing-list", "default", stonith__failed_history },
|
|
|
c563b9 |
{ "fencing-list", "default", stonith__history },
|
|
|
c563b9 |
{ "full-fencing-list", "default", stonith__full_history },
|
|
|
c563b9 |
- { "full-fencing-list", "xml", stonith__full_history_xml },
|
|
|
c563b9 |
- { "last-fenced", "html", stonith__last_fenced_html },
|
|
|
c563b9 |
- { "last-fenced", "log", stonith__last_fenced_text },
|
|
|
c563b9 |
- { "last-fenced", "text", stonith__last_fenced_text },
|
|
|
c563b9 |
- { "last-fenced", "xml", stonith__last_fenced_xml },
|
|
|
c563b9 |
+ { "full-fencing-list", "xml", full_history_xml },
|
|
|
c563b9 |
+ { "last-fenced", "html", last_fenced_html },
|
|
|
c563b9 |
+ { "last-fenced", "log", last_fenced_text },
|
|
|
c563b9 |
+ { "last-fenced", "text", last_fenced_text },
|
|
|
c563b9 |
+ { "last-fenced", "xml", last_fenced_xml },
|
|
|
c563b9 |
{ "pending-fencing-list", "default", stonith__pending_actions },
|
|
|
c563b9 |
- { "stonith-event", "html", stonith__event_html },
|
|
|
c563b9 |
- { "stonith-event", "log", stonith__event_text },
|
|
|
c563b9 |
- { "stonith-event", "text", stonith__event_text },
|
|
|
c563b9 |
- { "stonith-event", "xml", stonith__event_xml },
|
|
|
c563b9 |
- { "validate", "html", stonith__validate_agent_html },
|
|
|
c563b9 |
- { "validate", "log", stonith__validate_agent_text },
|
|
|
c563b9 |
- { "validate", "text", stonith__validate_agent_text },
|
|
|
c563b9 |
- { "validate", "xml", stonith__validate_agent_xml },
|
|
|
c563b9 |
+ { "stonith-event", "html", stonith_event_html },
|
|
|
c563b9 |
+ { "stonith-event", "log", stonith_event_text },
|
|
|
c563b9 |
+ { "stonith-event", "text", stonith_event_text },
|
|
|
c563b9 |
+ { "stonith-event", "xml", stonith_event_xml },
|
|
|
c563b9 |
+ { "validate", "html", validate_agent_html },
|
|
|
c563b9 |
+ { "validate", "log", validate_agent_text },
|
|
|
c563b9 |
+ { "validate", "text", validate_agent_text },
|
|
|
c563b9 |
+ { "validate", "xml", validate_agent_xml },
|
|
|
c563b9 |
|
|
|
c563b9 |
{ NULL, NULL, NULL }
|
|
|
c563b9 |
};
|
|
|
c563b9 |
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
|
|
|
c563b9 |
index 1b57f64..5562eb6 100644
|
|
|
c563b9 |
--- a/lib/pengine/pe_output.c
|
|
|
c563b9 |
+++ b/lib/pengine/pe_output.c
|
|
|
c563b9 |
@@ -273,8 +273,8 @@ pe__cluster_summary(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-summary", "pe_working_set_t *", "gboolean", "gboolean", "gboolean",
|
|
|
c563b9 |
"gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_summary_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_summary_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
gboolean show_stack = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -427,8 +427,8 @@ pe__name_and_nvpairs_xml(pcmk__output_t *out, bool is_list, const char *tag_name
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("ban", "pe_node_t *", "pe__location_t *", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__ban_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+ban_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *pe_node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
pe__location_t *location = va_arg(args, pe__location_t *);
|
|
|
c563b9 |
gboolean print_clone_detail = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -464,8 +464,8 @@ pe__ban_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("ban", "pe_node_t *", "pe__location_t *", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__ban_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+ban_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *pe_node = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
pe__location_t *location = va_arg(args, pe__location_t *);
|
|
|
c563b9 |
gboolean print_clone_detail G_GNUC_UNUSED = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -485,8 +485,8 @@ pe__ban_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-counts", "unsigned int", "int", "int", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_counts_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_counts_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
unsigned int nnodes = va_arg(args, unsigned int);
|
|
|
c563b9 |
int nresources = va_arg(args, int);
|
|
|
c563b9 |
int ndisabled = va_arg(args, int);
|
|
|
c563b9 |
@@ -581,8 +581,8 @@ pe__cluster_counts_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-counts", "unsigned int", "int", "int", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_counts_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_counts_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
unsigned int nnodes = va_arg(args, unsigned int);
|
|
|
c563b9 |
int nresources = va_arg(args, int);
|
|
|
c563b9 |
int ndisabled = va_arg(args, int);
|
|
|
c563b9 |
@@ -611,8 +611,8 @@ pe__cluster_counts_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-dc", "pe_node_t *", "const char *", "const char *", "char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_dc_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_dc_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *dc = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
const char *quorum = va_arg(args, const char *);
|
|
|
c563b9 |
const char *dc_version_s = va_arg(args, const char *);
|
|
|
c563b9 |
@@ -664,8 +664,8 @@ pe__cluster_dc_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-dc", "pe_node_t *", "const char *", "const char *", "char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_dc_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_dc_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_node_t *dc = va_arg(args, pe_node_t *);
|
|
|
c563b9 |
const char *quorum = va_arg(args, const char *);
|
|
|
c563b9 |
const char *dc_version_s = va_arg(args, const char *);
|
|
|
c563b9 |
@@ -707,8 +707,8 @@ pe__cluster_maint_mode_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-options", "pe_working_set_t *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_options_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_options_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
out->list_item(out, NULL, "STONITH of failed nodes %s",
|
|
|
c563b9 |
@@ -762,8 +762,8 @@ pe__cluster_options_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-options", "pe_working_set_t *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_options_log(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_options_log(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (pcmk_is_set(data_set->flags, pe_flag_maintenance_mode)) {
|
|
|
c563b9 |
@@ -815,8 +815,8 @@ pe__cluster_options_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-options", "pe_working_set_t *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_options_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_options_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
const char *no_quorum_policy = NULL;
|
|
|
c563b9 |
@@ -854,8 +854,8 @@ pe__cluster_options_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-stack", "const char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_stack_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_stack_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *stack_s = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
xmlNodePtr node = pcmk__output_create_xml_node(out, "li", NULL);
|
|
|
c563b9 |
@@ -876,8 +876,8 @@ pe__cluster_stack_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-stack", "const char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_stack_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_stack_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *stack_s = va_arg(args, const char *);
|
|
|
c563b9 |
|
|
|
c563b9 |
pcmk__output_create_xml_node(out, "stack",
|
|
|
c563b9 |
@@ -888,8 +888,8 @@ pe__cluster_stack_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-times", "const char *", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_times_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_times_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *last_written = va_arg(args, const char *);
|
|
|
c563b9 |
const char *user = va_arg(args, const char *);
|
|
|
c563b9 |
const char *client = va_arg(args, const char *);
|
|
|
c563b9 |
@@ -912,8 +912,8 @@ pe__cluster_times_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("cluster-times", "const char *", "const char *", "const char *", "const char *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__cluster_times_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+cluster_times_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *last_written = va_arg(args, const char *);
|
|
|
c563b9 |
const char *user = va_arg(args, const char *);
|
|
|
c563b9 |
const char *client = va_arg(args, const char *);
|
|
|
c563b9 |
@@ -962,8 +962,8 @@ pe__failed_action_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("failed-action", "xmlNodePtr")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__failed_action_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+failed_action_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
|
|
|
c563b9 |
const char *op_key = crm_element_value(xml_op, XML_LRM_ATTR_TASK_KEY);
|
|
|
c563b9 |
@@ -1249,8 +1249,8 @@ pe__node_attribute_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-attribute", "const char *", "const char *", "gboolean", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_attribute_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_attribute_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *name = va_arg(args, const char *);
|
|
|
c563b9 |
const char *value = va_arg(args, const char *);
|
|
|
c563b9 |
gboolean add_extra = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -1279,8 +1279,8 @@ pe__node_attribute_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-and-op", "pe_working_set_t *", "xmlNodePtr")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_and_op(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_and_op(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1333,8 +1333,8 @@ pe__node_and_op(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-and-op", "pe_working_set_t *", "xmlNodePtr")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_and_op_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_and_op_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1381,8 +1381,8 @@ pe__node_and_op_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-attribute", "const char *", "const char *", "gboolean", "int")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_attribute_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_attribute_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
const char *name = va_arg(args, const char *);
|
|
|
c563b9 |
const char *value = va_arg(args, const char *);
|
|
|
c563b9 |
gboolean add_extra = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -1403,8 +1403,8 @@ pe__node_attribute_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-list", "GList *", "GList *", "GList *", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_list_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_list_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
@@ -1572,8 +1572,8 @@ pe__node_list_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("node-list", "GList *", "GList *", "GList *", "unsigned int", "gboolean", "gboolean", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__node_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+node_list_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
GList *nodes = va_arg(args, GList *);
|
|
|
c563b9 |
GList *only_node = va_arg(args, GList *);
|
|
|
c563b9 |
GList *only_rsc = va_arg(args, GList *);
|
|
|
c563b9 |
@@ -1616,8 +1616,8 @@ pe__op_history_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("op-history", "xmlNodePtr", "const char *", "const char *", "int", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__op_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+op_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
xmlNodePtr xml_op = va_arg(args, xmlNodePtr);
|
|
|
c563b9 |
const char *task = va_arg(args, const char *);
|
|
|
c563b9 |
const char *interval_ms_s = va_arg(args, const char *);
|
|
|
c563b9 |
@@ -1676,7 +1676,8 @@ pe__op_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("resource-config", "pe_resource_t *", "gboolean")
|
|
|
c563b9 |
-int pe__resource_config(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+resource_config(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
gboolean raw = va_arg(args, gboolean);
|
|
|
c563b9 |
|
|
|
c563b9 |
@@ -1718,8 +1719,8 @@ pe__resource_history_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("resource-history", "pe_resource_t *", "const char *", "gboolean", "int", "time_t", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__resource_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+resource_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_resource_t *rsc = va_arg(args, pe_resource_t *);
|
|
|
c563b9 |
const char *rsc_id = va_arg(args, const char *);
|
|
|
c563b9 |
gboolean all = va_arg(args, gboolean);
|
|
|
c563b9 |
@@ -1762,8 +1763,8 @@ pe__resource_history_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("resource-list", "pe_working_set_t *", "unsigned int", "gboolean",
|
|
|
c563b9 |
"gboolean", "gboolean", "gboolean", "GList *", "GList *", "gboolean")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
{
|
|
|
c563b9 |
pe_working_set_t *data_set = va_arg(args, pe_working_set_t *);
|
|
|
c563b9 |
unsigned int print_opts = va_arg(args, unsigned int);
|
|
|
c563b9 |
@@ -1861,8 +1862,8 @@ pe__resource_list(pcmk__output_t *out, va_list args)
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("ticket", "pe_ticket_t *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__ticket_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+ticket_html(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_ticket_t *ticket = va_arg(args, pe_ticket_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
if (ticket->last_granted > -1) {
|
|
|
c563b9 |
@@ -1903,8 +1904,8 @@ pe__ticket_text(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
PCMK__OUTPUT_ARGS("ticket", "pe_ticket_t *")
|
|
|
c563b9 |
-int
|
|
|
c563b9 |
-pe__ticket_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
+static int
|
|
|
c563b9 |
+ticket_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
pe_ticket_t *ticket = va_arg(args, pe_ticket_t *);
|
|
|
c563b9 |
|
|
|
c563b9 |
xmlNodePtr node = NULL;
|
|
|
c563b9 |
@@ -1923,10 +1924,10 @@ pe__ticket_xml(pcmk__output_t *out, va_list args) {
|
|
|
c563b9 |
}
|
|
|
c563b9 |
|
|
|
c563b9 |
static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
- { "ban", "html", pe__ban_html },
|
|
|
c563b9 |
+ { "ban", "html", ban_html },
|
|
|
c563b9 |
{ "ban", "log", pe__ban_text },
|
|
|
c563b9 |
{ "ban", "text", pe__ban_text },
|
|
|
c563b9 |
- { "ban", "xml", pe__ban_xml },
|
|
|
c563b9 |
+ { "ban", "xml", ban_xml },
|
|
|
c563b9 |
{ "bundle", "xml", pe__bundle_xml },
|
|
|
c563b9 |
{ "bundle", "html", pe__bundle_html },
|
|
|
c563b9 |
{ "bundle", "text", pe__bundle_text },
|
|
|
c563b9 |
@@ -1935,30 +1936,30 @@ static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "clone", "html", pe__clone_html },
|
|
|
c563b9 |
{ "clone", "text", pe__clone_text },
|
|
|
c563b9 |
{ "clone", "log", pe__clone_text },
|
|
|
c563b9 |
- { "cluster-counts", "html", pe__cluster_counts_html },
|
|
|
c563b9 |
+ { "cluster-counts", "html", cluster_counts_html },
|
|
|
c563b9 |
{ "cluster-counts", "log", pe__cluster_counts_text },
|
|
|
c563b9 |
{ "cluster-counts", "text", pe__cluster_counts_text },
|
|
|
c563b9 |
- { "cluster-counts", "xml", pe__cluster_counts_xml },
|
|
|
c563b9 |
- { "cluster-dc", "html", pe__cluster_dc_html },
|
|
|
c563b9 |
+ { "cluster-counts", "xml", cluster_counts_xml },
|
|
|
c563b9 |
+ { "cluster-dc", "html", cluster_dc_html },
|
|
|
c563b9 |
{ "cluster-dc", "log", pe__cluster_dc_text },
|
|
|
c563b9 |
{ "cluster-dc", "text", pe__cluster_dc_text },
|
|
|
c563b9 |
- { "cluster-dc", "xml", pe__cluster_dc_xml },
|
|
|
c563b9 |
- { "cluster-options", "html", pe__cluster_options_html },
|
|
|
c563b9 |
- { "cluster-options", "log", pe__cluster_options_log },
|
|
|
c563b9 |
+ { "cluster-dc", "xml", cluster_dc_xml },
|
|
|
c563b9 |
+ { "cluster-options", "html", cluster_options_html },
|
|
|
c563b9 |
+ { "cluster-options", "log", cluster_options_log },
|
|
|
c563b9 |
{ "cluster-options", "text", pe__cluster_options_text },
|
|
|
c563b9 |
- { "cluster-options", "xml", pe__cluster_options_xml },
|
|
|
c563b9 |
+ { "cluster-options", "xml", cluster_options_xml },
|
|
|
c563b9 |
{ "cluster-summary", "default", pe__cluster_summary },
|
|
|
c563b9 |
- { "cluster-summary", "html", pe__cluster_summary_html },
|
|
|
c563b9 |
- { "cluster-stack", "html", pe__cluster_stack_html },
|
|
|
c563b9 |
+ { "cluster-summary", "html", cluster_summary_html },
|
|
|
c563b9 |
+ { "cluster-stack", "html", cluster_stack_html },
|
|
|
c563b9 |
{ "cluster-stack", "log", pe__cluster_stack_text },
|
|
|
c563b9 |
{ "cluster-stack", "text", pe__cluster_stack_text },
|
|
|
c563b9 |
- { "cluster-stack", "xml", pe__cluster_stack_xml },
|
|
|
c563b9 |
- { "cluster-times", "html", pe__cluster_times_html },
|
|
|
c563b9 |
+ { "cluster-stack", "xml", cluster_stack_xml },
|
|
|
c563b9 |
+ { "cluster-times", "html", cluster_times_html },
|
|
|
c563b9 |
{ "cluster-times", "log", pe__cluster_times_text },
|
|
|
c563b9 |
{ "cluster-times", "text", pe__cluster_times_text },
|
|
|
c563b9 |
- { "cluster-times", "xml", pe__cluster_times_xml },
|
|
|
c563b9 |
+ { "cluster-times", "xml", cluster_times_xml },
|
|
|
c563b9 |
{ "failed-action", "default", pe__failed_action_text },
|
|
|
c563b9 |
- { "failed-action", "xml", pe__failed_action_xml },
|
|
|
c563b9 |
+ { "failed-action", "xml", failed_action_xml },
|
|
|
c563b9 |
{ "group", "xml", pe__group_xml },
|
|
|
c563b9 |
{ "group", "html", pe__group_html },
|
|
|
c563b9 |
{ "group", "text", pe__group_text },
|
|
|
c563b9 |
@@ -1968,30 +1969,30 @@ static pcmk__message_entry_t fmt_functions[] = {
|
|
|
c563b9 |
{ "node", "log", pe__node_text },
|
|
|
c563b9 |
{ "node", "text", pe__node_text },
|
|
|
c563b9 |
{ "node", "xml", pe__node_xml },
|
|
|
c563b9 |
- { "node-and-op", "default", pe__node_and_op },
|
|
|
c563b9 |
- { "node-and-op", "xml", pe__node_and_op_xml },
|
|
|
c563b9 |
- { "node-list", "html", pe__node_list_html },
|
|
|
c563b9 |
+ { "node-and-op", "default", node_and_op },
|
|
|
c563b9 |
+ { "node-and-op", "xml", node_and_op_xml },
|
|
|
c563b9 |
+ { "node-list", "html", node_list_html },
|
|
|
c563b9 |
{ "node-list", "log", pe__node_list_text },
|
|
|
c563b9 |
{ "node-list", "text", pe__node_list_text },
|
|
|
c563b9 |
- { "node-list", "xml", pe__node_list_xml },
|
|
|
c563b9 |
- { "node-attribute", "html", pe__node_attribute_html },
|
|
|
c563b9 |
+ { "node-list", "xml", node_list_xml },
|
|
|
c563b9 |
+ { "node-attribute", "html", node_attribute_html },
|
|
|
c563b9 |
{ "node-attribute", "log", pe__node_attribute_text },
|
|
|
c563b9 |
{ "node-attribute", "text", pe__node_attribute_text },
|
|
|
c563b9 |
- { "node-attribute", "xml", pe__node_attribute_xml },
|
|
|
c563b9 |
+ { "node-attribute", "xml", node_attribute_xml },
|
|
|
c563b9 |
{ "op-history", "default", pe__op_history_text },
|
|
|
c563b9 |
- { "op-history", "xml", pe__op_history_xml },
|
|
|
c563b9 |
+ { "op-history", "xml", op_history_xml },
|
|
|
c563b9 |
{ "primitive", "xml", pe__resource_xml },
|
|
|
c563b9 |
{ "primitive", "html", pe__resource_html },
|
|
|
c563b9 |
{ "primitive", "text", pe__resource_text },
|
|
|
c563b9 |
{ "primitive", "log", pe__resource_text },
|
|
|
c563b9 |
- { "resource-config", "default", pe__resource_config },
|
|
|
c563b9 |
+ { "resource-config", "default", resource_config },
|
|
|
c563b9 |
{ "resource-history", "default", pe__resource_history_text },
|
|
|
c563b9 |
- { "resource-history", "xml", pe__resource_history_xml },
|
|
|
c563b9 |
- { "resource-list", "default", pe__resource_list },
|
|
|
c563b9 |
- { "ticket", "html", pe__ticket_html },
|
|
|
c563b9 |
+ { "resource-history", "xml", resource_history_xml },
|
|
|
c563b9 |
+ { "resource-list", "default", resource_list },
|
|
|
c563b9 |
+ { "ticket", "html", ticket_html },
|
|
|
c563b9 |
{ "ticket", "log", pe__ticket_text },
|
|
|
c563b9 |
{ "ticket", "text", pe__ticket_text },
|
|
|
c563b9 |
- { "ticket", "xml", pe__ticket_xml },
|
|
|
c563b9 |
+ { "ticket", "xml", ticket_xml },
|
|
|
c563b9 |
|
|
|
c563b9 |
{ NULL, NULL, NULL }
|
|
|
c563b9 |
};
|
|
|
c563b9 |
--
|
|
|
c563b9 |
1.8.3.1
|
|
|
c563b9 |
|