diff --git a/include/crm/pengine/common_compat.h b/include/crm/pengine/common_compat.h index f114029aef..1d83a0a543 100644 --- a/include/crm/pengine/common_compat.h +++ b/include/crm/pengine/common_compat.h @@ -1,65 +1,62 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_COMMON_COMPAT__H # define PCMK__CRM_PENGINE_COMMON_COMPAT__H #include #ifdef __cplusplus extern "C" { #endif /** * \file * \brief Deprecated Pacemaker scheduler utilities * \ingroup pengine * \deprecated Do not include this header directly. The utilities in this * header, and the header itself, will be removed in a future * release. */ //! \deprecated Use (pcmk_role_promoted + 1) instead #define RSC_ROLE_MAX (pcmk_role_promoted + 1) //! \deprecated Use pcmk_role_text(pcmk_role_unknown) instead #define RSC_ROLE_UNKNOWN_S pcmk_role_text(pcmk_role_unknown) //! \deprecated Use pcmk_role_text(pcmk_role_stopped) instead #define RSC_ROLE_STOPPED_S pcmk_role_text(pcmk_role_stopped) //! \deprecated Use pcmk_role_text(pcmk_role_started) instead #define RSC_ROLE_STARTED_S pcmk_role_text(pcmk_role_started) //! \deprecated Use pcmk_role_text(pcmk_role_unpromoted) instead #define RSC_ROLE_UNPROMOTED_S pcmk_role_text(pcmk_role_unpromoted) //! \deprecated Use pcmk_role_text(pcmk_role_promoted) instead #define RSC_ROLE_PROMOTED_S pcmk_role_text(pcmk_role_promoted) //! \deprecated Do not use #define RSC_ROLE_UNPROMOTED_LEGACY_S "Slave" //! \deprecated Do not use #define RSC_ROLE_SLAVE_S RSC_ROLE_UNPROMOTED_LEGACY_S //! \deprecated Do not use #define RSC_ROLE_PROMOTED_LEGACY_S "Master" //! \deprecated Do not use #define RSC_ROLE_MASTER_S RSC_ROLE_PROMOTED_LEGACY_S -//! \deprecated Use pcmk_role_text() instead -const char *role2text(enum rsc_role_e role); - #ifdef __cplusplus } #endif #endif // PCMK__CRM_PENGINE_COMMON_COMPAT__H diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index 2bb50da581..c2dfe463d8 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -1,82 +1,80 @@ # # Copyright 2004-2024 the Pacemaker project contributors # # The version control history for this file may have further details. # # This source code is licensed under the GNU General Public License version 2 # or later (GPLv2+) WITHOUT ANY WARRANTY. # include $(top_srcdir)/mk/common.mk # Without "." here, check-recursive will run through the subdirectories first # and then run "make check" here. This will fail, because there's things in # the subdirectories that need check_LTLIBRARIES built first. Adding "." here # changes the order so the subdirectories are processed afterwards. SUBDIRS = . tests ## libraries lib_LTLIBRARIES = libpe_rules.la \ libpe_status.la check_LTLIBRARIES = libpe_status_test.la noinst_HEADERS = pe_status_private.h libpe_rules_la_LDFLAGS = -version-info 30:2:4 libpe_rules_la_CFLAGS = $(CFLAGS_HARDENED_LIB) libpe_rules_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la ## Library sources (*must* use += format for bumplibs) -libpe_rules_la_SOURCES = common.c -libpe_rules_la_SOURCES += rules.c +libpe_rules_la_SOURCES = rules.c libpe_rules_la_SOURCES += rules_alerts.c libpe_status_la_LDFLAGS = -version-info 35:1:7 libpe_status_la_CFLAGS = $(CFLAGS_HARDENED_LIB) libpe_status_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB) libpe_status_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la ## Library sources (*must* use += format for bumplibs) libpe_status_la_SOURCES = libpe_status_la_SOURCES += bundle.c libpe_status_la_SOURCES += clone.c -libpe_status_la_SOURCES += common.c libpe_status_la_SOURCES += complex.c libpe_status_la_SOURCES += failcounts.c libpe_status_la_SOURCES += group.c libpe_status_la_SOURCES += native.c libpe_status_la_SOURCES += pe_actions.c libpe_status_la_SOURCES += pe_health.c libpe_status_la_SOURCES += pe_digest.c libpe_status_la_SOURCES += pe_notif.c libpe_status_la_SOURCES += pe_output.c libpe_status_la_SOURCES += remote.c libpe_status_la_SOURCES += rules.c libpe_status_la_SOURCES += status.c libpe_status_la_SOURCES += tags.c libpe_status_la_SOURCES += unpack.c libpe_status_la_SOURCES += utils.c # # libpe_status_test is only used with unit tests, so we can # mock system calls. See lib/common/mock.c for details. # include $(top_srcdir)/mk/tap.mk libpe_status_test_la_SOURCES = $(libpe_status_la_SOURCES) libpe_status_test_la_LDFLAGS = $(libpe_status_la_LDFLAGS) \ -rpath $(libdir) \ $(LDFLAGS_WRAP) # See comments on libcrmcommon_test_la in lib/common/Makefile.am regarding these flags. libpe_status_test_la_CFLAGS = $(libpe_status_la_CFLAGS) \ -DPCMK__UNIT_TESTING \ -fno-builtin \ -fno-inline libpe_status_test_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon_test.la \ -lcmocka \ -lm diff --git a/lib/pengine/common.c b/lib/pengine/common.c deleted file mode 100644 index 49214db6c5..0000000000 --- a/lib/pengine/common.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2004-2024 the Pacemaker project contributors - * - * The version control history for this file may have further details. - * - * This source code is licensed under the GNU Lesser General Public License - * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. - */ - -#include -#include -#include -#include - -#include - -#include -#include - -// Deprecated functions kept only for backward API compatibility -// LCOV_EXCL_START - -#include - -const char * -role2text(enum rsc_role_e role) -{ - return pcmk_role_text(role); -} - -// LCOV_EXCL_STOP -// End deprecated API