diff options
author | Kaushik BV <kaushikbv@gluster.com> | 2011-04-17 10:46:08 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-17 21:41:08 -0700 |
commit | 91b3d10880678cfa9c5ce03204eb62897a4564e8 (patch) | |
tree | f65335d160c448ff3b5cace36207ea7999cd6a06 /cli | |
parent | 3a621ae053a31db49f7adc506bd5ffbd24a0c64d (diff) |
cli: removal of dead code due to the code movement of geo-rep start from cli to glusterd.
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2676 ([glusterfs-3.2.0qa7]: glusterfs server crashed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2676
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index c92f043c817..1b882cd8f72 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -2621,64 +2621,6 @@ gf_cli3_1_gsync_get_command (gf1_cli_gsync_set_rsp rsp) return 0; } - -int -gf_cli3_1_gsync_get_param_file (char *prmfile, const char *ext, char *master, char *slave, char *gl_workdir) -{ - FILE *in = NULL; - char buff[PATH_MAX] = {0, }; - char cmd[PATH_MAX] = {0, }; - char *ptr = NULL; - char prmfolder[PATH_MAX] = {0, }; - char *dotp = NULL; - int ret = 0; - - if (!(master && slave && gl_workdir)) { - GF_ASSERT (!master && !slave && !gl_workdir); - /* extension adjustment mode */ - - dotp = strrchr (prmfile, '.'); - if (!dotp++ || - /* overflow */ - dotp - prmfile + strlen (ext) + 1 > PATH_MAX) - return -1; - - strcpy (dotp, ext); - return 0; - } - - snprintf (cmd, PATH_MAX, GSYNCD_PREFIX"/gsyncd --canonicalize-escape-url" - " %s %s", master, slave); - if (!(in = popen(cmd, "r"))) { - gf_log ("", GF_LOG_ERROR, "popen failed"); - return -1; - } - - ptr = fgets(buff, sizeof(buff), in); - if (ptr) { - buff[strlen(buff)-1]='\0'; //strip off \n - snprintf (prmfolder, PATH_MAX, "%s/"GEOREP"/%s", gl_workdir, buff); - } else { - ret = -1; - goto out; - } - - memset (buff, 0, PATH_MAX); - - ptr = fgets(buff, sizeof(buff), in); - if (ptr) { - buff[strlen(buff)-1]='\0'; //strip off \n - snprintf (prmfile, PATH_MAX, "%s/%s.%s", prmfolder, buff, ext); - } - - out: - ret |= pclose (in); - - if (ret) - gf_log ("", GF_LOG_ERROR, "popen failed"); - - return ret ? -1 : 0; -} int gf_cli3_1_gsync_out_status (dict_t *dict) { @@ -2729,36 +2671,6 @@ gf_cli3_1_gsync_out_status (dict_t *dict) } -/* status: 0 when gsync is running - * -1 when not running - */ -int -gf_cli3_1_gsync_status (char *master, char *slave, - char *pidfile, int *status) -{ - int ret = -1; - FILE *file = NULL; - - GF_VALIDATE_OR_GOTO ("gsync", master, out); - GF_VALIDATE_OR_GOTO ("gsync", slave, out); - GF_VALIDATE_OR_GOTO ("gsync", pidfile, out); - GF_VALIDATE_OR_GOTO ("gsync", status, out); - - file = fopen (pidfile, "r+"); - if (file) { - ret = lockf (fileno (file), F_TEST, 0); - if (ret == 0) { - *status = -1; - } - else - *status = 0; - } else - *status = -1; - ret = 0; -out: - return ret; -} - int gf_cli3_1_gsync_set_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) |