diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-27 04:49:34 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-27 05:53:55 -0700 |
commit | cd5578895e7a218518ed20eaa34c6d833ea65aaa (patch) | |
tree | 2c5a91b0462c729d522ba842b0dcb7a01a194192 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 07873893ad88e961cd0736872700f2bdc746d49c (diff) |
mgmt/glusterd: fixes in volgen file paths
* fixed argument to few xlator options generated by volgen
* commented out many options which we want to be default
* pid file and volume file name to contain export path info in them
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index c2d0af12dd9..0f2004779c8 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -180,8 +180,17 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); GLUSTERD_VOLUME_DIR_PREFIX, volinfo->volname, \ GLUSTERD_BRICK_INFO_DIR); -#define GLUSTERD_GET_BRICK_PIDFILE(pidfile, volpath, hostname, count) \ - snprintf (pidfile, PATH_MAX, "%s/run/%s-%d.pid", volpath, hostname, count); +#define GLUSTERD_GET_BRICK_PIDFILE(pidfile,volpath,hostname,brickpath) { \ + int i = 0; \ + char exp_path[PATH_MAX] = {0,}; \ + for (i = 0; i < strlen (path); i++) { \ + exp_path[i] = brickpath[i]; \ + if (exp_path[i] == '/') \ + exp_path[i] = '-'; \ + } \ + snprintf (pidfile, PATH_MAX, "%s/run/%s-%s.pid", \ + volpath, hostname, exp_path); \ + } int32_t glusterd_brick_from_brickinfo (glusterd_brickinfo_t *brickinfo, |