ucs_status_t ucp_config_read(const char *env_prefix, const char *filename, ucp_config_t **config_p) { ucp_config_t *config; ucs_status_t status; config = ucs_malloc(sizeof(*config), "ucp config"); if (config == NULL) { status = UCS_ERR_NO_MEMORY; goto err; } status = ucs_config_parser_fill_opts(config, ucp_config_table, env_prefix, NULL, 0); if (status != UCS_OK) { goto err_free; } *config_p = config; return UCS_OK; err_free: ucs_free(config); err: return status; }
void ucs_global_opts_init() { ucs_status_t status; status = ucs_config_parser_fill_opts(&ucs_global_opts, ucs_global_opts_table, NULL, NULL, 1); if (status != UCS_OK) { ucs_fatal("failed to parse global configuration - aborting"); } }