Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
pacemaker.27546
bsc#1198409-0001-Refactor-tools-set-commands-in...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1198409-0001-Refactor-tools-set-commands-in-crm_resource-before-c.patch of Package pacemaker.27546
From c572d9f270b6e0f36329bc51ec6a4901bb8a300d Mon Sep 17 00:00:00 2001 From: "Gao,Yan" <ygao@suse.com> Date: Thu, 14 Apr 2022 11:42:18 +0200 Subject: [PATCH 1/3] Refactor: tools: set commands in crm_resource before changing any options So that we detect any specifying of multiple commands and handle that first. --- tools/crm_resource.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_resource.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_resource.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_resource.c @@ -689,8 +689,8 @@ cleanup_refresh_cb(const gchar *option_n gboolean delete_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) { - options.require_dataset = FALSE; SET_COMMAND(cmd_delete); + options.require_dataset = FALSE; options.find_flags = pe_find_renamed|pe_find_any; return TRUE; } @@ -783,38 +783,38 @@ option_cb(const gchar *option_name, cons gboolean fail_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) { + SET_COMMAND(cmd_fail); options.require_crmd = TRUE; options.require_node = TRUE; - SET_COMMAND(cmd_fail); return TRUE; } gboolean flag_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) { if (pcmk__str_any_of(option_name, "-U", "--clear", NULL)) { - options.find_flags = pe_find_renamed|pe_find_anon; SET_COMMAND(cmd_clear); - } else if (pcmk__str_any_of(option_name, "-B", "--ban", NULL)) { options.find_flags = pe_find_renamed|pe_find_anon; + } else if (pcmk__str_any_of(option_name, "-B", "--ban", NULL)) { SET_COMMAND(cmd_ban); - } else if (pcmk__str_any_of(option_name, "-M", "--move", NULL)) { options.find_flags = pe_find_renamed|pe_find_anon; + } else if (pcmk__str_any_of(option_name, "-M", "--move", NULL)) { SET_COMMAND(cmd_move); + options.find_flags = pe_find_renamed|pe_find_anon; } else if (pcmk__str_any_of(option_name, "-q", "--query-xml", NULL)) { options.find_flags = pe_find_renamed|pe_find_any; SET_COMMAND(cmd_query_xml); } else if (pcmk__str_any_of(option_name, "-w", "--query-xml-raw", NULL)) { - options.find_flags = pe_find_renamed|pe_find_any; SET_COMMAND(cmd_query_raw_xml); + options.find_flags = pe_find_renamed|pe_find_any; } else if (pcmk__str_any_of(option_name, "-W", "--locate", NULL)) { - options.find_flags = pe_find_renamed|pe_find_anon; SET_COMMAND(cmd_locate); - } else if (pcmk__str_any_of(option_name, "-A", "--stack", NULL)) { options.find_flags = pe_find_renamed|pe_find_anon; + } else if (pcmk__str_any_of(option_name, "-A", "--stack", NULL)) { SET_COMMAND(cmd_colocations_deep); - } else { options.find_flags = pe_find_renamed|pe_find_anon; + } else { SET_COMMAND(cmd_colocations); + options.find_flags = pe_find_renamed|pe_find_anon; } return TRUE; @@ -874,6 +874,7 @@ set_delete_param_cb(const gchar *option_ gboolean set_prop_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) { + SET_COMMAND(cmd_set_property); options.require_dataset = FALSE; if (options.prop_name) { @@ -881,7 +882,6 @@ set_prop_cb(const gchar *option_name, co } options.prop_name = strdup(optarg); - SET_COMMAND(cmd_set_property); options.find_flags = pe_find_renamed|pe_find_any; return TRUE; } @@ -950,8 +950,8 @@ wait_cb(const gchar *option_name, const gboolean why_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) { - options.require_resource = FALSE; SET_COMMAND(cmd_why); + options.require_resource = FALSE; options.find_flags = pe_find_renamed|pe_find_anon; return TRUE; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor