From 87b59802197e199f7a5022f1dc59d1025580db49 Mon Sep 17 00:00:00 2001 From: resver Date: Tue, 4 Dec 2012 16:14:38 +0000 Subject: [PATCH] OS X utilities report error if fchmod() fails. Added empty chmod() handler as a workaround. git-svn-id: http://exfat.googlecode.com/svn/trunk@297 60bc1c72-a15a-11de-b98f-4500b42dc123 --- fuse/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fuse/main.c b/fuse/main.c index 76404ce..84db40d 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -230,6 +230,15 @@ static int fuse_exfat_utimens(const char* path, const struct timespec tv[2]) return 0; } +#ifdef __APPLE__ +static int fuse_exfat_chmod(const char* path, mode_t mode) +{ + exfat_debug("[fuse_exfat_chmod] %s 0%ho", path, mode); + /* make OS X utilities happy */ + return 0; +} +#endif + static int fuse_exfat_statfs(const char* path, struct statvfs* sfs) { sfs->f_bsize = CLUSTER_SIZE(*ef.sb); @@ -278,6 +287,9 @@ static struct fuse_operations fuse_exfat_ops = .mkdir = fuse_exfat_mkdir, .rename = fuse_exfat_rename, .utimens = fuse_exfat_utimens, +#ifdef __APPLE__ + .chmod = fuse_exfat_chmod, +#endif .statfs = fuse_exfat_statfs, .destroy = fuse_exfat_destroy, }; -- 2.11.0