MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / node_list_dup

Function node_list_dup

lib/pengine/utils.c:108–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108GListPtr
109node_list_dup(GListPtr list1, gboolean reset, gboolean filter)
110{
111 GListPtr result = NULL;
112 GListPtr gIter = list1;
113
114 for (; gIter != NULL; gIter = gIter->next) {
115 node_t *new_node = NULL;
116 node_t *this_node = (node_t *) gIter->data;
117
118 if (filter && this_node->weight < 0) {
119 continue;
120 }
121
122 new_node = node_copy(this_node);
123 if (reset) {
124 new_node->weight = 0;
125 }
126 if (new_node != NULL) {
127 result = g_list_prepend(result, new_node);
128 }
129 }
130
131 return result;
132}
133
134gint
135sort_node_uname(gconstpointer a, gconstpointer b)

Callers 3

unpack_rsc_locationFunction · 0.85
generate_location_ruleFunction · 0.85
group_rsc_locationFunction · 0.85

Calls 1

node_copyFunction · 0.85

Tested by

no test coverage detected