From 11fb070964adf57eea4191d315a752c96f80a426 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 17 May 2010 07:09:13 +0000 Subject: OS X: adjustments, minor fixes to eliminate warnings Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361 --- xlators/cluster/unify/src/unify.c | 6 ++++-- xlators/debug/trace/src/trace.c | 12 ++++++------ xlators/storage/posix/src/posix.c | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c index d1fe847bc..e50d3274f 100644 --- a/xlators/cluster/unify/src/unify.c +++ b/xlators/cluster/unify/src/unify.c @@ -1117,7 +1117,8 @@ unify_open_lookup_cbk (call_frame_t *frame, int32_t op_errno, inode_t *inode, struct iatt *buf, - dict_t *dict) + dict_t *dict, + struct iatt *postparent) { int32_t callcnt = 0; int16_t index = 0; @@ -1209,7 +1210,8 @@ unify_open_readlink_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - const char *path) + const char *path, + struct iatt *sbuf) { int16_t index = 0; unify_private_t *priv = this->private; diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c index aa9d33f3e..20ac6dbb5 100644 --- a/xlators/debug/trace/src/trace.c +++ b/xlators/debug/trace/src/trace.c @@ -171,9 +171,9 @@ trace_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, localtime ((time_t *)&buf->ia_ctime)); gf_log (this->name, GF_LOG_NORMAL, - "%"PRId64": (op_ret=%d, buf {ia_gen=%"GF_PRI_DEV", " + "%"PRId64": (op_ret=%d, buf {ia_gen=%"PRIu64", " "ia_ino=%"PRIu64", st_mode=%o, ia_nlink=%"GF_PRI_NLINK", " - "ia_uid=%d, ia_gid=%d, ia_rdev=%"GF_PRI_DEV", ia_size=%"PRId64 + "ia_uid=%d, ia_gid=%d, ia_rdev=%"PRIu64", ia_size=%"PRId64 ", ia_blksize=%"GF_PRI_BLKSIZE", ia_blocks=%"PRId64", " "ia_atime=%s, ia_mtime=%s, ia_ctime=%s})", frame->root->unique, op_ret, buf->ia_gen, buf->ia_ino, @@ -212,9 +212,9 @@ trace_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, localtime ((time_t *)&buf->ia_ctime)); gf_log (this->name, GF_LOG_NORMAL, - "%"PRId64": (op_ret=%d, op_errno=%d, *buf {ia_gen=%"GF_PRI_DEV", " + "%"PRId64": (op_ret=%d, op_errno=%d, *buf {ia_gen=%"PRIu64", " "ia_ino=%"PRIu64", st_mode=%o, ia_nlink=%"GF_PRI_NLINK", " - "ia_uid=%d, ia_gid=%d, ia_rdev=%"GF_PRI_DEV", " + "ia_uid=%d, ia_gid=%d, ia_rdev=%"PRIu64", " "ia_size=%"PRId64", ia_blksize=%"GF_PRI_BLKSIZE", " "ia_blocks=%"PRId64", ia_atime=%s, ia_mtime=%s, ia_ctime=%s})", frame->root->unique, op_ret, op_errno, buf->ia_gen, buf->ia_ino, @@ -1052,9 +1052,9 @@ trace_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, localtime ((time_t *)&buf->ia_ctime)); gf_log (this->name, GF_LOG_NORMAL, - "%"PRId64": (op_ret=%d, *buf {ia_gen=%"GF_PRI_DEV", " + "%"PRId64": (op_ret=%d, *buf {ia_gen=%"PRIu64", " "ia_ino=%"PRIu64", st_mode=%o, ia_nlink=%"GF_PRI_NLINK", " - "ia_uid=%d, ia_gid=%d, ia_rdev=%"GF_PRI_DEV", ia_size=%"PRId64", " + "ia_uid=%d, ia_gid=%d, ia_rdev=%"PRIu64", ia_size=%"PRId64", " "ia_blksize=%"GF_PRI_BLKSIZE", ia_blocks=%"PRId64", ia_atime=%s, " "ia_mtime=%s, ia_ctime=%s})", frame->root->unique, op_ret, buf->ia_gen, buf->ia_ino, diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 22e9fcecb..e9a8fc886 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -273,7 +273,7 @@ posix_lstat_with_gen (xlator_t *this, const char *path, struct iatt *stbuf_p) } #ifndef GF_LINUX_HOST_OS - if (stbuf.ia_type != IA_IFDIR && stbuf.ia_type != IA_IFREG) { + if (!IA_ISDIR (stbuf.ia_type) && !IA_ISREG (stbuf.ia_type)) { stbuf.ia_gen = (typeof(stbuf.ia_gen))stbuf.ia_mtime; if (stbuf_p) *stbuf_p = stbuf; @@ -344,7 +344,7 @@ posix_fstat_with_gen (xlator_t *this, int fd, struct iatt *stbuf_p) } #ifndef GF_LINUX_HOST_OS - if (stbuf.ia_type != IA_IFDIR && stbuf.ia_type != IA_IFREG) { + if (!IA_ISDIR (stbuf.ia_type) && !IA_ISREG (stbuf.ia_type)) { stbuf.ia_gen = (typeof(stbuf.ia_gen))stbuf.ia_mtime; return 0; } -- cgit