summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpc/block_svc_routines.c2
-rw-r--r--utils/utils.h17
2 files changed, 7 insertions, 12 deletions
diff --git a/rpc/block_svc_routines.c b/rpc/block_svc_routines.c
index 3b13a2b..d47a841 100644
--- a/rpc/block_svc_routines.c
+++ b/rpc/block_svc_routines.c
@@ -411,6 +411,7 @@ glusterBlockCallRPC_1(char *host, void *cobj,
goto out;
}
break;
+ case MODIFY_TPGC_SRV:
case LIST_SRV:
case INFO_SRV:
goto out;
@@ -2059,7 +2060,6 @@ block_create_1_svc(blockCreate *blk, struct svc_req *rqstp)
char *attr = NULL;
char *authcred = NULL;
char *exec = NULL;
- char *global_opts = NULL;
blockResponse *reply = NULL;
blockServerDefPtr list = NULL;
size_t i;
diff --git a/utils/utils.h b/utils/utils.h
index 9bb9cc4..d3b1027 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -240,15 +240,12 @@ extern struct gbConf gbConf;
char tmp[1024]; \
LOG("mgmt", GB_LOG_DEBUG, "command, %s", cmd); \
fp = popen(cmd, "r"); \
- if (vol) \
- snprintf(tmp, 1024, "%s/%s", vol, blk->block_name); \
- else \
- snprintf(tmp, 1024, "%s", blk->block_name); \
+ snprintf(tmp, 1024, "%s/%s", vol?vol:"", blk->block_name); \
if (fp) { \
size_t newLen = fread(sr->out, sizeof(char), 8192, fp); \
if (ferror( fp ) != 0) \
LOG("mgmt", GB_LOG_ERROR, \
- "reading command %s output for %s failed", tmp, \
+ "reading command %s output for %s failed(%s)", tmp,\
cmd, strerror(errno)); \
else \
sr->out[newLen++] = '\0'; \
@@ -265,15 +262,13 @@ extern struct gbConf gbConf;
sr->exit); \
} while (0)
-# define GB_OUT_VALIDATE_OR_GOTO(out, label, errStr, blk, vol, fmt ...)\
+# define GB_OUT_VALIDATE_OR_GOTO(out, label, errStr, blk, vol, ...) \
do { \
char *tmp; \
char vol_blk[1024]; \
- if (vol) \
- snprintf(vol_blk, 1024, "%s/%s", vol, blk->block_name); \
- else \
- snprintf(vol_blk, 1024, "%s", blk->block_name); \
- if (GB_ASPRINTF(&tmp, fmt) == -1) \
+ snprintf(vol_blk, 1024, "%s/%s", vol?vol:"", \
+ blk->block_name); \
+ if (GB_ASPRINTF(&tmp, __VA_ARGS__) == -1) \
goto label; \
if (!strstr(out, tmp)) { \
GB_FREE(tmp); \