diff options
author | Ajeet Jha <ajha@redhat.com> | 2013-12-02 12:55:18 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-12-12 00:16:25 -0800 |
commit | b198e072cda4bbb98e19701399c4bb4f0743cf20 (patch) | |
tree | f8a2b689179752b65a5fcff11a3d89a82d7e2ca4 /cli/src/cli-cmd-parser.c | |
parent | f999c17da5a5353196e68e7a68af64f91df6b902 (diff) |
glusterd/geo-rep: more glusterd and cli fixes for geo-rep.
-> handle option validation cases in reset case.
-> Creating valid conf path when glusterd restarts.
-> Reading the gsyncd worker thread status and displaying it.
-> Displaying status-detail per worker.
-> Fetch checkpoint info in geo-rep status.
-> use-tarssh value validation added.
misc: misc geo-rep fixes based on cluster, logrotate etc..
-> cluster/dht: fix 'stime' getxattr getting overwritten.
-> cluster/afr: return max of 'stime' values in subvol.
-> geo-rep-logrotate: Sending SIGHUP to geo-rep auxiliary.
-> cluster/dht: fix convoluted logic while aggregating.
-> cluster/*: fix 'stime' min/max fetch logic.
Change-Id: I811acea0bbd6194797a3e55d89295d1ea021ac85
BUG: 1036552
Signed-off-by: Ajeet Jha <ajha@redhat.com>
Reviewed-on: http://review.gluster.org/6405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 8a37d8e785f..0aeaccd0ce0 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1737,13 +1737,13 @@ config_parse (const char **words, int wordcount, dict_t *dict, } append_str[append_len - 2] = '\0'; /* "checkpoint now" is special: we resolve that "now" */ - if (strcmp (words[cmdi + 1], "checkpoint") == 0 && - strcmp (append_str, "now") == 0) { + if ((strcmp (words[cmdi + 1], "checkpoint") == 0) && + (strcmp (append_str, "now") == 0)) { struct timeval tv = {0,}; ret = gettimeofday (&tv, NULL); if (ret == -1) - goto out; /* FIXME: free append_str? */ + goto out; GF_FREE (append_str); append_str = GF_CALLOC (1, 300, cli_mt_append_str); @@ -1751,10 +1751,8 @@ config_parse (const char **words, int wordcount, dict_t *dict, ret = -1; goto out; } - strcpy (append_str, "as of "); - gf_time_fmt (append_str + strlen ("as of "), - 300 - strlen ("as of "), - tv.tv_sec, gf_timefmt_FT); + snprintf (append_str, 300, "now:%ld.%06ld", + tv.tv_sec, tv.tv_usec); } ret = dict_set_dynstr (dict, "op_value", append_str); |