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

Function main

tools/corosync-cmapctl.c:817–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815}
816
817int main(int argc, char *argv[])
818{
819 enum user_action action;
820 int c;
821 cs_error_t err;
822 cmap_handle_t handle;
823 int i;
824 size_t value_len;
825 cmap_value_types_t type;
826 cmap_map_t map = CMAP_MAP_DEFAULT;
827 int track_prefix;
828 int map_set = 0;
829 int no_retries;
830 char * clear_opt = NULL;
831 char * settings_file = NULL;
832 int count_of_no_result = 0;
833
834 action = ACTION_PRINT_PREFIX;
835 track_prefix = 1;
836
837 while ((c = getopt(argc, argv, "m:hqgsdDtTbp:C:")) != -1) {
838 switch (c) {
839 case 'h':
840 return print_help();
841 break;
842 case 'b':
843 show_binary++;
844 break;
845 case 'q':
846 quiet = 1;
847 break;
848 case 'g':
849 action = ACTION_GET;
850 break;
851 case 's':
852 action = ACTION_SET;
853 break;
854 case 'd':
855 action = ACTION_DELETE;
856 break;
857 case 'D':
858 action = ACTION_DELETE_PREFIX;
859 break;
860 case 'p':
861 settings_file = optarg;
862 action = ACTION_LOAD;
863 break;
864 case 'C':
865 if (strcmp(optarg, "knet") == 0 ||
866 strcmp(optarg, "totem") == 0 ||
867 strcmp(optarg, "ipc") == 0 ||
868 strcmp(optarg, "schedmiss") == 0 ||
869 strcmp(optarg, "all") == 0) {
870 action = ACTION_CLEARSTATS;
871 clear_opt = optarg;
872
873 /* Force the map to be STATS */
874 map = CMAP_MAP_STATS;

Callers

nothing calls this directly

Calls 14

print_helpFunction · 0.85
cmap_initialize_mapFunction · 0.85
cs_strerrorFunction · 0.85
print_iterFunction · 0.85
cmap_getFunction · 0.85
print_keyFunction · 0.85
cmap_deleteFunction · 0.85
delete_with_prefixFunction · 0.85
read_in_config_fileFunction · 0.85
add_trackFunction · 0.85
track_changesFunction · 0.85
set_keyFunction · 0.85

Tested by

no test coverage detected