summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-03-18 17:23:15 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-22 01:27:06 -0700
commit83ab05db5505a033a66385a7e1aaad605fea562b (patch)
tree0290fec43cfd3b48348a5ebb60e4e1af50475cf8
parent283ec9608e6cbc9393941d5fae901e558360d2bd (diff)
fix warnings on 32 bit
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
-rw-r--r--libglusterfs/src/logging.h2
-rw-r--r--xlators/features/trash/src/trash.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index 1f0c4ac7d..3c197c015 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -32,7 +32,7 @@
#define GF_PRI_FSBLK PRId64
#define GF_PRI_BLKSIZE PRId32
-#define GF_PRI_SIZET PRId64
+#define GF_PRI_SIZET "zu"
#define GF_PRI_NLINK PRId32
#define GF_PRI_DEV PRId64
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 3d41ab798..5ee3da2c8 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -295,7 +295,7 @@ trash_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (buf->ia_size > priv->max_trash_file_size) {
gf_log (this->name, GF_LOG_DEBUG,
- "%s: file size too big (%"GF_PRI_SIZET") to "
+ "%s: file size too big (%"PRId64") to "
"move into trash directory",
local->loc.path, buf->ia_size);
}
@@ -470,7 +470,7 @@ trash_rename_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (buf->ia_size > priv->max_trash_file_size) {
gf_log (this->name, GF_LOG_DEBUG,
- "%s: file size too big (%"GF_PRI_SIZET") to "
+ "%s: file size too big (%"PRId64") to "
"move into trash directory",
local->newloc.path, buf->ia_size);
}
@@ -1424,6 +1424,7 @@ init (xlator_t *this)
char *strtokptr = NULL;
char *component = NULL;
char trash_dir[PATH_MAX] = {0,};
+ uint64_t max_trash_file_size64 = 0;
/* Create .trashcan directory in init */
if (!this->children || this->children->next) {
@@ -1497,13 +1498,14 @@ init (xlator_t *this)
_priv->max_trash_file_size = GF_DEFAULT_MAX_FILE_SIZE;
} else {
ret = gf_string2bytesize (data->data,
- &_priv->max_trash_file_size);
- if( _priv->max_trash_file_size > GF_ALLOWED_MAX_FILE_SIZE ) {
+ &max_trash_file_size64);
+ if( max_trash_file_size64 > GF_ALLOWED_MAX_FILE_SIZE ) {
gf_log (this->name, GF_LOG_DEBUG,
"Size specified for max-size(in MB) is too "
"large so using 1GB as max-size (NOT IDEAL)");
_priv->max_trash_file_size = GF_ALLOWED_MAX_FILE_SIZE;
- }
+ } else
+ _priv->max_trash_file_size = max_trash_file_size64;
gf_log (this->name, GF_LOG_DEBUG, "%"GF_PRI_SIZET" max-size",
_priv->max_trash_file_size);
}