root/lib/common/nodes.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. pcmk__xe_add_node

   1 /*
   2  * Copyright 2022 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 <crm/common/nvpair.h>
  13 
  14 void
  15 pcmk__xe_add_node(xmlNode *xml, const char *node, int nodeid)
     /* [previous][next][first][last][top][bottom][index][help] */
  16 {
  17     if (node != NULL) {
  18         crm_xml_add(xml, PCMK__XA_ATTR_NODE_NAME, node);
  19     }
  20 
  21     if (nodeid > 0) {
  22         crm_xml_add_int(xml, PCMK__XA_ATTR_NODE_ID, nodeid);
  23     }
  24 }

/* [previous][next][first][last][top][bottom][index][help] */