summaryrefslogtreecommitdiffstats
path: root/xlators/features/trash/src/trash.c
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 /xlators/features/trash/src/trash.c
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
Diffstat (limited to 'xlators/features/trash/src/trash.c')
-rw-r--r--xlators/features/trash/src/trash.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 3d41ab798ee..5ee3da2c8c7 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);
}