summaryrefslogtreecommitdiffstats
path: root/include/crm/services_compat.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:40 +0000
commit07d7f4cfa4b10de87a31b68191036ff446add675 (patch)
tree7162524d8aaf1aef62d2f4fa51f595ed113981ff /include/crm/services_compat.h
parentAdding upstream version 2.1.6. (diff)
downloadpacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.tar.xz
pacemaker-07d7f4cfa4b10de87a31b68191036ff446add675.zip
Adding upstream version 2.1.7.upstream/2.1.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/crm/services_compat.h')
-rw-r--r--include/crm/services_compat.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/crm/services_compat.h b/include/crm/services_compat.h
index 97310f4..456d351 100644
--- a/include/crm/services_compat.h
+++ b/include/crm/services_compat.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2022 the Pacemaker project contributors
+ * Copyright 2010-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -10,7 +10,7 @@
#ifndef PCMK__CRM_SERVICES_COMPAT__H
# define PCMK__CRM_SERVICES_COMPAT__H
-
+#include <crm/common/actions.h>
#include <crm/common/results.h>
#include <crm/services.h>
#include <glib.h>
@@ -68,7 +68,8 @@ static inline enum ocf_exitcode
services_get_ocf_exitcode(const char *action, int lsb_exitcode)
{
/* For non-status actions, LSB and OCF share error code meaning <= 7 */
- if (action && strcmp(action, "status") && strcmp(action, "monitor")) {
+ if ((action != NULL) && (strcmp(action, PCMK_ACTION_STATUS) != 0)
+ && (strcmp(action, PCMK_ACTION_MONITOR) != 0)) {
if ((lsb_exitcode < 0) || (lsb_exitcode > PCMK_LSB_NOT_RUNNING)) {
return PCMK_OCF_UNKNOWN_ERROR;
}