LCOV - code coverage report
Current view: top level - common - output_none.c (source / functions) Hit Total Coverage
Test: Pacemaker code coverage Lines: 0 64 0.0 %
Date: 2024-05-07 11:09:47 Functions: 0 18 0.0 %

          Line data    Source code
       1             : /*
       2             :  * Copyright 2019-2024 the Pacemaker project contributors
       3             :  *
       4             :  * The version control history for this file may have further details.
       5             :  *
       6             :  * This source code is licensed under the GNU Lesser General Public License
       7             :  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
       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             : static void
      19           0 : none_free_priv(pcmk__output_t *out) {
      20             :     /* This function intentionally left blank */
      21           0 : }
      22             : 
      23             : static bool
      24           0 : none_init(pcmk__output_t *out) {
      25           0 :     return true;
      26             : }
      27             : 
      28             : static void
      29           0 : none_finish(pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest) {
      30             :     /* This function intentionally left blank */
      31           0 : }
      32             : 
      33             : static void
      34           0 : none_reset(pcmk__output_t *out) {
      35           0 :     CRM_ASSERT(out != NULL);
      36           0 :     none_free_priv(out);
      37           0 :     none_init(out);
      38           0 : }
      39             : 
      40             : static void
      41           0 : none_subprocess_output(pcmk__output_t *out, int exit_status,
      42             :                        const char *proc_stdout, const char *proc_stderr) {
      43             :     /* This function intentionally left blank */
      44           0 : }
      45             : 
      46             : static void
      47           0 : none_version(pcmk__output_t *out, bool extended) {
      48             :     /* This function intentionally left blank */
      49           0 : }
      50             : 
      51             : G_GNUC_PRINTF(2, 3)
      52             : static void
      53           0 : none_err(pcmk__output_t *out, const char *format, ...) {
      54             :     /* This function intentionally left blank */
      55           0 : }
      56             : 
      57             : G_GNUC_PRINTF(2, 3)
      58             : static int
      59           0 : none_info(pcmk__output_t *out, const char *format, ...) {
      60           0 :     return pcmk_rc_no_output;
      61             : }
      62             : 
      63             : static void
      64           0 : none_output_xml(pcmk__output_t *out, const char *name, const char *buf) {
      65             :     /* This function intentionally left blank */
      66           0 : }
      67             : 
      68             : G_GNUC_PRINTF(4, 5)
      69             : static void
      70           0 : none_begin_list(pcmk__output_t *out, const char *singular_noun, const char *plural_noun,
      71             :                 const char *format, ...) {
      72             :     /* This function intentionally left blank */
      73           0 : }
      74             : 
      75             : G_GNUC_PRINTF(3, 4)
      76             : static void
      77           0 : none_list_item(pcmk__output_t *out, const char *id, const char *format, ...) {
      78             :     /* This function intentionally left blank */
      79           0 : }
      80             : 
      81             : static void
      82           0 : none_increment_list(pcmk__output_t *out) {
      83             :     /* This function intentionally left blank */
      84           0 : }
      85             : 
      86             : static void
      87           0 : none_end_list(pcmk__output_t *out) {
      88             :     /* This function intentionally left blank */
      89           0 : }
      90             : 
      91             : static bool
      92           0 : none_is_quiet(pcmk__output_t *out) {
      93           0 :     return out->quiet;
      94             : }
      95             : 
      96             : static void
      97           0 : none_spacer(pcmk__output_t *out) {
      98             :     /* This function intentionally left blank */
      99           0 : }
     100             : 
     101             : static void
     102           0 : none_progress(pcmk__output_t *out, bool end) {
     103             :     /* This function intentionally left blank */
     104           0 : }
     105             : 
     106             : static void
     107           0 : none_prompt(const char *prompt, bool echo, char **dest) {
     108             :     /* This function intentionally left blank */
     109           0 : }
     110             : 
     111             : pcmk__output_t *
     112           0 : pcmk__mk_none_output(char **argv) {
     113           0 :     pcmk__output_t *retval = calloc(1, sizeof(pcmk__output_t));
     114             : 
     115           0 :     if (retval == NULL) {
     116           0 :         return NULL;
     117             :     }
     118             : 
     119           0 :     retval->fmt_name = PCMK_VALUE_NONE;
     120           0 :     retval->request = pcmk__quote_cmdline(argv);
     121             : 
     122           0 :     retval->init = none_init;
     123           0 :     retval->free_priv = none_free_priv;
     124           0 :     retval->finish = none_finish;
     125           0 :     retval->reset = none_reset;
     126             : 
     127           0 :     retval->register_message = pcmk__register_message;
     128           0 :     retval->message = pcmk__call_message;
     129             : 
     130           0 :     retval->subprocess_output = none_subprocess_output;
     131           0 :     retval->version = none_version;
     132           0 :     retval->info = none_info;
     133           0 :     retval->transient = none_info;
     134           0 :     retval->err = none_err;
     135           0 :     retval->output_xml = none_output_xml;
     136             : 
     137           0 :     retval->begin_list = none_begin_list;
     138           0 :     retval->list_item = none_list_item;
     139           0 :     retval->increment_list = none_increment_list;
     140           0 :     retval->end_list = none_end_list;
     141             : 
     142           0 :     retval->is_quiet = none_is_quiet;
     143           0 :     retval->spacer = none_spacer;
     144           0 :     retval->progress = none_progress;
     145           0 :     retval->prompt = none_prompt;
     146             : 
     147           0 :     return retval;
     148             : }

Generated by: LCOV version 1.14