diff options
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 17 | ||||
| -rw-r--r-- | libglusterfs/src/glusterfs/common-utils.h | 3 | ||||
| -rw-r--r-- | libglusterfs/src/libglusterfs.sym | 1 | 
3 files changed, 19 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 4104c576fd2..0798661806d 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -503,8 +503,7 @@ gf_resolve_ip6(const char *hostname, uint16_t port, int family, void **dnscache,          if ((ret = getaddrinfo(hostname, port_str, &hints, &cache->first)) !=              0) {              gf_msg("resolver", GF_LOG_ERROR, 0, LG_MSG_GETADDRINFO_FAILED, -                   "getaddrinfo failed" -                   " (%s)", +                   "getaddrinfo failed (family:%d) (%s)", family,                     gai_strerror(ret));              GF_FREE(*dnscache); @@ -5328,3 +5327,17 @@ gf_replace_new_iatt_in_dict(dict_t *xdata)      return ret;  } + +xlator_cmdline_option_t * +find_xlator_option_in_cmd_args_t(const char *option_name, cmd_args_t *args) +{ +    xlator_cmdline_option_t *pos = NULL; +    xlator_cmdline_option_t *tmp = NULL; + +    list_for_each_entry_safe(pos, tmp, &args->xlator_options, cmd_args) +    { +        if (strcmp(pos->key, option_name) == 0) +            return pos; +    } +    return NULL; +} diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h index e7101be4aab..9061861ce3b 100644 --- a/libglusterfs/src/glusterfs/common-utils.h +++ b/libglusterfs/src/glusterfs/common-utils.h @@ -1064,4 +1064,7 @@ gf_replace_old_iatt_in_dict(struct _dict *);  int  gf_replace_new_iatt_in_dict(struct _dict *); +xlator_cmdline_option_t * +find_xlator_option_in_cmd_args_t(const char *option_name, cmd_args_t *args); +  #endif /* _COMMON_UTILS_H */ diff --git a/libglusterfs/src/libglusterfs.sym b/libglusterfs/src/libglusterfs.sym index e03cc987c81..beeab5468f9 100644 --- a/libglusterfs/src/libglusterfs.sym +++ b/libglusterfs/src/libglusterfs.sym @@ -1149,3 +1149,4 @@ gf_replace_new_iatt_in_dict  gf_changelog_init  gf_changelog_register_generic  gf_gfid_generate_from_xxh64 +find_xlator_option_in_cmd_args_t  | 
