24
24
#include <crm/common/ipc.h>
25
25
#include <crm/cib.h>
26
26
27
- #define SUMMARY "Compare two Pacemaker configurations (in XML format) to produce a custom diff-like output, " \
28
- "or apply such an output as a patch"
27
+ #define SUMMARY "Compare two Pacemaker configurations (in XML format) to " \
28
+ "produce a custom diff-like output, or apply such an output " \
29
+ "as a patch"
29
30
30
31
struct {
31
32
gboolean apply ;
@@ -38,9 +39,32 @@ struct {
38
39
char * xml_file_new ;
39
40
} options ;
40
41
41
- gboolean new_string_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error );
42
- gboolean original_string_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error );
43
- gboolean patch_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error );
42
+ static gboolean
43
+ new_string_cb (const gchar * option_name , const gchar * optarg , gpointer data ,
44
+ GError * * error )
45
+ {
46
+ options .raw_new = TRUE;
47
+ pcmk__str_update (& options .xml_file_new , optarg );
48
+ return TRUE;
49
+ }
50
+
51
+ static gboolean
52
+ original_string_cb (const gchar * option_name , const gchar * optarg , gpointer data ,
53
+ GError * * error )
54
+ {
55
+ options .raw_original = TRUE;
56
+ pcmk__str_update (& options .xml_file_original , optarg );
57
+ return TRUE;
58
+ }
59
+
60
+ static gboolean
61
+ patch_cb (const gchar * option_name , const gchar * optarg , gpointer data ,
62
+ GError * * error )
63
+ {
64
+ options .apply = TRUE;
65
+ pcmk__str_update (& options .xml_file_new , optarg );
66
+ return TRUE;
67
+ }
44
68
45
69
static GOptionEntry original_xml_entries [] = {
46
70
{ "original" , 'o' , 0 , G_OPTION_ARG_STRING , & options .xml_file_original ,
@@ -81,27 +105,6 @@ static GOptionEntry addl_entries[] = {
81
105
{ NULL }
82
106
};
83
107
84
- gboolean
85
- new_string_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error ) {
86
- options .raw_new = TRUE;
87
- pcmk__str_update (& options .xml_file_new , optarg );
88
- return TRUE;
89
- }
90
-
91
- gboolean
92
- original_string_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error ) {
93
- options .raw_original = TRUE;
94
- pcmk__str_update (& options .xml_file_original , optarg );
95
- return TRUE;
96
- }
97
-
98
- gboolean
99
- patch_cb (const gchar * option_name , const gchar * optarg , gpointer data , GError * * error ) {
100
- options .apply = TRUE;
101
- pcmk__str_update (& options .xml_file_new , optarg );
102
- return TRUE;
103
- }
104
-
105
108
static void
106
109
print_patch (xmlNode * patch )
107
110
{
0 commit comments