- Update for new upstream tarball for release candidate: Pacemaker-2.1.1-rc3, for full details, see included ChangeLog file or https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.1-rc3 - Make tools exit-codes consistent for --version - Check exit-codes of tools prior to manpage-generation
83 lines
2.8 KiB
Diff
83 lines
2.8 KiB
Diff
From b34570ecaeb4fb0106dd0aa5a8776a5417a07f90 Mon Sep 17 00:00:00 2001
|
|
From: Klaus Wenninger <klaus.wenninger@aon.at>
|
|
Date: Mon, 16 Aug 2021 16:41:18 +0200
|
|
Subject: [PATCH] Fix: tools: make exit-code stdout/stderr consistent with
|
|
--version
|
|
|
|
---
|
|
tools/crm_attribute.c | 2 +-
|
|
tools/crm_diff.c | 2 +-
|
|
tools/crm_error.c | 2 +-
|
|
tools/crm_node.c | 2 +-
|
|
tools/crm_rule.c | 2 +-
|
|
5 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c
|
|
index 6bd4e2a..faf4aae 100644
|
|
--- a/tools/crm_attribute.c
|
|
+++ b/tools/crm_attribute.c
|
|
@@ -326,7 +326,7 @@ main(int argc, char **argv)
|
|
g_strfreev(processed_args);
|
|
pcmk__free_arg_context(context);
|
|
/* FIXME: When crm_attribute is converted to use formatted output, this can go. */
|
|
- pcmk__cli_help('v', CRM_EX_USAGE);
|
|
+ pcmk__cli_help('v', CRM_EX_OK);
|
|
}
|
|
|
|
if (options.promotion_score && options.attr_name == NULL) {
|
|
diff --git a/tools/crm_diff.c b/tools/crm_diff.c
|
|
index 9890c10..18f5d48 100644
|
|
--- a/tools/crm_diff.c
|
|
+++ b/tools/crm_diff.c
|
|
@@ -322,7 +322,7 @@ main(int argc, char **argv)
|
|
g_strfreev(processed_args);
|
|
pcmk__free_arg_context(context);
|
|
/* FIXME: When crm_diff is converted to use formatted output, this can go. */
|
|
- pcmk__cli_help('v', CRM_EX_USAGE);
|
|
+ pcmk__cli_help('v', CRM_EX_OK);
|
|
}
|
|
|
|
if (options.apply && options.no_version) {
|
|
diff --git a/tools/crm_error.c b/tools/crm_error.c
|
|
index 923f393..f26efe7 100644
|
|
--- a/tools/crm_error.c
|
|
+++ b/tools/crm_error.c
|
|
@@ -93,7 +93,7 @@ main(int argc, char **argv)
|
|
g_strfreev(processed_args);
|
|
pcmk__free_arg_context(context);
|
|
/* FIXME: When crm_error is converted to use formatted output, this can go. */
|
|
- pcmk__cli_help('v', CRM_EX_USAGE);
|
|
+ pcmk__cli_help('v', CRM_EX_OK);
|
|
}
|
|
|
|
if (options.do_list) {
|
|
diff --git a/tools/crm_node.c b/tools/crm_node.c
|
|
index 25da978..489a39a 100644
|
|
--- a/tools/crm_node.c
|
|
+++ b/tools/crm_node.c
|
|
@@ -549,7 +549,7 @@ main(int argc, char **argv)
|
|
g_strfreev(processed_args);
|
|
pcmk__free_arg_context(context);
|
|
/* FIXME: When crm_node is converted to use formatted output, this can go. */
|
|
- pcmk__cli_help('v', CRM_EX_USAGE);
|
|
+ pcmk__cli_help('v', CRM_EX_OK);
|
|
}
|
|
|
|
if (options.command == 0) {
|
|
diff --git a/tools/crm_rule.c b/tools/crm_rule.c
|
|
index 30c5155..0880415 100644
|
|
--- a/tools/crm_rule.c
|
|
+++ b/tools/crm_rule.c
|
|
@@ -252,7 +252,7 @@ main(int argc, char **argv)
|
|
g_strfreev(processed_args);
|
|
pcmk__free_arg_context(context);
|
|
/* FIXME: When crm_rule is converted to use formatted output, this can go. */
|
|
- pcmk__cli_help('v', CRM_EX_USAGE);
|
|
+ pcmk__cli_help('v', CRM_EX_OK);
|
|
}
|
|
|
|
/* Check command line arguments before opening a connection to
|
|
--
|
|
1.8.3.1
|
|
|