MCPcopy Create free account
hub / github.com/corosync/corosync / print_iter

Function print_iter

tools/corosync-cmapctl.c:420–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420static int print_iter(cmap_handle_t handle, const char *prefix)
421{
422 cmap_iter_handle_t iter_handle;
423 char key_name[CMAP_KEYNAME_MAXLEN + 1];
424 size_t value_len;
425 cmap_value_types_t type;
426 cs_error_t err;
427 int no_result = 1;
428
429 err = cmap_iter_init(handle, prefix, &iter_handle);
430 if (err != CS_OK) {
431 fprintf (stderr, "Failed to initialize iteration. Error %s\n", cs_strerror(err));
432 exit (EXIT_FAILURE);
433 }
434
435 while ((err = cmap_iter_next(handle, iter_handle, key_name, &value_len, &type)) == CS_OK) {
436 no_result = 0;
437 print_key(handle, key_name, value_len, NULL, type);
438 }
439
440 cmap_iter_finalize(handle, iter_handle);
441 return no_result;
442}
443
444static void delete_with_prefix(cmap_handle_t handle, const char *prefix)
445{

Callers 1

mainFunction · 0.85

Calls 5

cmap_iter_initFunction · 0.85
cs_strerrorFunction · 0.85
cmap_iter_nextFunction · 0.85
print_keyFunction · 0.85
cmap_iter_finalizeFunction · 0.85

Tested by

no test coverage detected