summaryrefslogtreecommitdiffstats
path: root/tools/crmadmin.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:39:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:39:28 +0000
commit7332b914bff2786ff70ccace103fc9ebdfb61a23 (patch)
tree3a8a60c4edba014c7e350be41839e3edbf2a315f /tools/crmadmin.c
parentAdding debian version 2.1.7-1. (diff)
downloadpacemaker-7332b914bff2786ff70ccace103fc9ebdfb61a23.tar.xz
pacemaker-7332b914bff2786ff70ccace103fc9ebdfb61a23.zip
Merging upstream version 2.1.8~rc1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/crmadmin.c')
-rw-r--r--tools/crmadmin.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tools/crmadmin.c b/tools/crmadmin.c
index 0b400ae..082904f 100644
--- a/tools/crmadmin.c
+++ b/tools/crmadmin.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2023 the Pacemaker project contributors
+ * Copyright 2004-2024 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -33,7 +33,7 @@ static enum {
struct {
gboolean health;
- gint timeout;
+ guint timeout;
char *optarg;
char *ipc_name;
gboolean bash_export;
@@ -117,11 +117,7 @@ command_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError
}
if (!strcmp(option_name, "--timeout") || !strcmp(option_name, "-t")) {
- options.timeout = crm_parse_interval_spec(optarg);
- if (errno == EINVAL) {
- return FALSE;
- }
- return TRUE;
+ return pcmk_parse_interval_spec(optarg, &options.timeout) == pcmk_rc_ok;
}
pcmk__str_update(&options.optarg, optarg);
@@ -205,10 +201,6 @@ main(int argc, char **argv)
out->quiet = args->quiet;
- if (!pcmk__force_args(context, &error, "%s --xml-simple-list --xml-substitute", g_get_prgname())) {
- goto done;
- }
-
if (args->version) {
out->version(out, false);
goto done;