"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "glusterfsd/src/glusterfsd.c" between
glusterfs-9.2.tar.gz and glusterfs-9.3.tar.gz

About: GlusterFS is a network/cluster filesystem. The storage server (or each in a cluster) runs glusterfsd and the clients use mount command or glusterfs client to mount the exported filesystem. Release series 9.x (latest version).

glusterfsd.c  (glusterfs-9.2):glusterfsd.c  (glusterfs-9.3)
skipping to change at line 768 skipping to change at line 768
parse_opts(int key, char *arg, struct argp_state *state) parse_opts(int key, char *arg, struct argp_state *state)
{ {
cmd_args_t *cmd_args = NULL; cmd_args_t *cmd_args = NULL;
uint32_t n = 0; uint32_t n = 0;
#ifdef GF_LINUX_HOST_OS #ifdef GF_LINUX_HOST_OS
int32_t k = 0; int32_t k = 0;
struct oom_api_info *api = NULL; struct oom_api_info *api = NULL;
#endif #endif
double d = 0.0; double d = 0.0;
gf_boolean_t b = _gf_false; gf_boolean_t b = _gf_false;
char *pwd = NULL;
char *tmp_str = NULL; char *tmp_str = NULL;
char *port_str = NULL; char *port_str = NULL;
struct passwd *pw = NULL; struct passwd *pw = NULL;
int ret = 0; int ret = 0;
cmd_args = state->input; cmd_args = state->input;
switch (key) { switch (key) {
case ARGP_VOLFILE_SERVER_KEY: case ARGP_VOLFILE_SERVER_KEY:
gf_remember_backup_volfile_server(arg); gf_remember_backup_volfile_server(arg);
skipping to change at line 854 skipping to change at line 853
} }
argp_failure(state, -1, 0, "invalid value \"%s\" for mac-compat", argp_failure(state, -1, 0, "invalid value \"%s\" for mac-compat",
arg); arg);
break; break;
case ARGP_VOLUME_FILE_KEY: case ARGP_VOLUME_FILE_KEY:
GF_FREE(cmd_args->volfile); GF_FREE(cmd_args->volfile);
if (arg[0] != '/') { if (arg[0] != '/') {
pwd = getcwd(NULL, PATH_MAX); char pwd[PATH_MAX];
if (!pwd) { if (!getcwd(pwd, PATH_MAX)) {
argp_failure(state, -1, errno, argp_failure(state, -1, errno,
"getcwd failed with error no %d", errno); "getcwd failed with error no %d", errno);
break; break;
} }
char tmp_buf[1024]; gf_asprintf(&cmd_args->volfile, "%s/%s", pwd, arg);
snprintf(tmp_buf, sizeof(tmp_buf), "%s/%s", pwd, arg);
cmd_args->volfile = gf_strdup(tmp_buf);
free(pwd);
} else { } else {
cmd_args->volfile = gf_strdup(arg); cmd_args->volfile = gf_strdup(arg);
} }
break; break;
case ARGP_LOG_LEVEL_KEY: case ARGP_LOG_LEVEL_KEY:
if (strcasecmp(arg, ARGP_LOG_LEVEL_NONE_OPTION) == 0) { if (strcasecmp(arg, ARGP_LOG_LEVEL_NONE_OPTION) == 0) {
cmd_args->log_level = GF_LOG_NONE; cmd_args->log_level = GF_LOG_NONE;
break; break;
 End of changes. 3 change blocks. 
7 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)