summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/Makefile.am2
-rw-r--r--cli/src/cli-cmd-parser.c6
-rw-r--r--cli/src/cli-cmd-volume.c4
-rw-r--r--cli/src/cli-rpc-ops.c10
-rw-r--r--cli/src/cli-xml-output.c2
-rw-r--r--cli/src/cli.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index 4f8f239..923600f 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -21,7 +21,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \
-DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) -DSBIN_DIR=\"$(sbindir)\"\
$(XML_CPPFLAGS)
-AM_CFLAGS = -Wall $(GF_GLUSTERFS_CFLAGS)
+AM_CFLAGS = -Wall $(GF_CFLAGS)
CLEANFILES =
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 9714449..36f710f 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -620,7 +620,7 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **options)
goto out;
}
- ret = gf_string2bytesize (words[5], &value);
+ ret = gf_string2bytesize_uint64 (words[5], &value);
if (ret != 0) {
if (errno == ERANGE)
cli_err ("Value too large: %s", words[5]);
@@ -1750,7 +1750,7 @@ config_parse (const char **words, int wordcount, dict_t *dict,
ret = -1;
goto out;
}
- snprintf (append_str, 300, "now:%ld.%06ld",
+ snprintf (append_str, 300, "now:%" GF_PRI_SECOND ".%06"GF_PRI_SUSECONDS,
tv.tv_sec, tv.tv_usec);
}
@@ -3025,7 +3025,7 @@ cli_snap_create_parse (dict_t *dict, const char **words, int wordcount) {
&& (strcmp (words[i], "force") != 0); i++) {
volcount++;
/* volume index starts from 1 */
- ret = snprintf (key, sizeof (key), "volname%ld", volcount);
+ ret = snprintf (key, sizeof (key), "volname%"PRIu64, volcount);
if (ret < 0) {
goto out;
}
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 3b927d2..53c94c6 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -2008,14 +2008,14 @@ cli_print_detailed_status (cli_volume_status_t *status)
if (status->total_inodes) {
- cli_out ("%-20s : %-20ld", "Inode Count",
+ cli_out ("%-20s : %-20"GF_PRI_INODE, "Inode Count",
status->total_inodes);
} else {
cli_out ("%-20s : %-20s", "Inode Count", "N/A");
}
if (status->free_inodes) {
- cli_out ("%-20s : %-20ld", "Free Inodes",
+ cli_out ("%-20s : %-20"GF_PRI_INODE, "Free Inodes",
status->free_inodes);
} else {
cli_out ("%-20s : %-20s", "Free Inodes", "N/A");
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index ebabf6b..8481d46 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -5211,7 +5211,7 @@ gf_cli_top_volume_cbk (struct rpc_req *req, struct iovec *iov,
gf_time_fmt (timestr, sizeof timestr,
time_sec, gf_timefmt_FT);
snprintf (timestr + strlen (timestr), sizeof timestr - strlen (timestr),
- ".%"GF_PRI_SUSECONDS, time_usec);
+ ".%ld", time_usec);
if (strlen (filename) < VOL_TOP_PERF_FILENAME_DEF_WIDTH)
cli_out ("%*"PRIu64" %-*s %-*s",
VOL_TOP_PERF_SPEED_WIDTH,
@@ -7766,7 +7766,7 @@ cli_snapshot_config_display (dict_t *dict, gf_cli_rsp *rsp)
}
for (i = 0; i < voldisplaycount; i++) {
- snprintf (buf, sizeof(buf), "volume%ld-volname", i);
+ snprintf (buf, sizeof(buf), "volume%"PRIu64"-volname", i);
ret = dict_get_str (dict, buf, &volname);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not fetch "
@@ -7777,7 +7777,7 @@ cli_snapshot_config_display (dict_t *dict, gf_cli_rsp *rsp)
cli_out ("\nVolume : %s", volname);
snprintf (buf, sizeof(buf),
- "volume%ld-snap-max-hard-limit", i);
+ "volume%"PRIu64"-snap-max-hard-limit", i);
ret = dict_get_uint64 (dict, buf, &value);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not fetch "
@@ -7788,7 +7788,7 @@ cli_snapshot_config_display (dict_t *dict, gf_cli_rsp *rsp)
cli_out ("snap-max-hard-limit : %"PRIu64, value);
snprintf (buf, sizeof(buf),
- "volume%ld-active-hard-limit", i);
+ "volume%"PRIu64"-active-hard-limit", i);
ret = dict_get_uint64 (dict, buf, &value);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not fetch"
@@ -7801,7 +7801,7 @@ cli_snapshot_config_display (dict_t *dict, gf_cli_rsp *rsp)
value);
snprintf (buf, sizeof(buf),
- "volume%ld-snap-max-soft-limit", i);
+ "volume%"PRIu64"-snap-max-soft-limit", i);
ret = dict_get_uint64 (dict, buf, &value);
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Could not fetch "
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 863e8a4..0eb23bf 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -2299,7 +2299,7 @@ cli_xml_output_vol_profile (dict_t *dict, int op_ret, int op_errno,
goto out;
ret = xmlTextWriterWriteFormatElement
- (writer, (xmlChar *)"clearStats", "%s",
+ (writer, (xmlChar *)"clearStats", "%s",
stats_cleared ? "Cleared stats." :
"Failed to clear stats.");
if (ret)
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 2c70368..745b0b4 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -179,7 +179,7 @@ logging_init (glusterfs_ctx_t *ctx, struct cli_state *state)
/* CLI should not have something to DEBUG after the release,
hence defaulting to INFO loglevel */
- gf_log_set_loglevel ((state->log_level == -1) ? GF_LOG_INFO :
+ gf_log_set_loglevel ((state->log_level == GF_LOG_NONE) ? GF_LOG_INFO :
state->log_level);
return 0;