This source file includes following definitions.
- none_free_priv
- none_init
- none_finish
- none_reset
- none_subprocess_output
- none_version
- G_GNUC_PRINTF
- G_GNUC_PRINTF
- none_output_xml
- G_GNUC_PRINTF
- G_GNUC_PRINTF
- none_increment_list
- none_end_list
- none_is_quiet
- none_spacer
- none_progress
- none_prompt
- pcmk__mk_none_output
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <stdlib.h>
13 #include <glib.h>
14
15 #include <crm/crm.h>
16 #include <crm/common/cmdline_internal.h>
17
18 GOptionEntry pcmk__none_output_entries[] = {
19 { NULL }
20 };
21
22 static void
23 none_free_priv(pcmk__output_t *out) {
24
25 }
26
27 static bool
28 none_init(pcmk__output_t *out) {
29 return true;
30 }
31
32 static void
33 none_finish(pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest) {
34
35 }
36
37 static void
38 none_reset(pcmk__output_t *out) {
39 CRM_ASSERT(out != NULL);
40 none_free_priv(out);
41 none_init(out);
42 }
43
44 static void
45 none_subprocess_output(pcmk__output_t *out, int exit_status,
46 const char *proc_stdout, const char *proc_stderr) {
47
48 }
49
50 static void
51 none_version(pcmk__output_t *out, bool extended) {
52
53 }
54
55 G_GNUC_PRINTF(2, 3)
56 static void
57 none_err(pcmk__output_t *out, const char *format, ...) {
58
59 }
60
61 G_GNUC_PRINTF(2, 3)
62 static int
63 none_info(pcmk__output_t *out, const char *format, ...) {
64 return pcmk_rc_no_output;
65 }
66
67 static void
68 none_output_xml(pcmk__output_t *out, const char *name, const char *buf) {
69
70 }
71
72 G_GNUC_PRINTF(4, 5)
73 static void
74 none_begin_list(pcmk__output_t *out, const char *singular_noun, const char *plural_noun,
75 const char *format, ...) {
76
77 }
78
79 G_GNUC_PRINTF(3, 4)
80 static void
81 none_list_item(pcmk__output_t *out, const char *id, const char *format, ...) {
82
83 }
84
85 static void
86 none_increment_list(pcmk__output_t *out) {
87
88 }
89
90 static void
91 none_end_list(pcmk__output_t *out) {
92
93 }
94
95 static bool
96 none_is_quiet(pcmk__output_t *out) {
97 return out->quiet;
98 }
99
100 static void
101 none_spacer(pcmk__output_t *out) {
102
103 }
104
105 static void
106 none_progress(pcmk__output_t *out, bool end) {
107
108 }
109
110 static void
111 none_prompt(const char *prompt, bool echo, char **dest) {
112
113 }
114
115 pcmk__output_t *
116 pcmk__mk_none_output(char **argv) {
117 pcmk__output_t *retval = calloc(1, sizeof(pcmk__output_t));
118
119 if (retval == NULL) {
120 return NULL;
121 }
122
123 retval->fmt_name = PCMK__VALUE_NONE;
124 retval->request = pcmk__quote_cmdline(argv);
125
126 retval->init = none_init;
127 retval->free_priv = none_free_priv;
128 retval->finish = none_finish;
129 retval->reset = none_reset;
130
131 retval->register_message = pcmk__register_message;
132 retval->message = pcmk__call_message;
133
134 retval->subprocess_output = none_subprocess_output;
135 retval->version = none_version;
136 retval->info = none_info;
137 retval->transient = none_info;
138 retval->err = none_err;
139 retval->output_xml = none_output_xml;
140
141 retval->begin_list = none_begin_list;
142 retval->list_item = none_list_item;
143 retval->increment_list = none_increment_list;
144 retval->end_list = none_end_list;
145
146 retval->is_quiet = none_is_quiet;
147 retval->spacer = none_spacer;
148 retval->progress = none_progress;
149 retval->prompt = none_prompt;
150
151 return retval;
152 }