From c314a8115b1bac405ce4a65281242c11e59767da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 11 Feb 2017 09:26:58 +0100 Subject: [PATCH] Fixed nesting when not using plugins The logical nesting (defined by {...}) did not match the physical nesting (defined by #ifdef...#endif) --- src/ntfs-3g_common.c | 5 +++-- src/ntfs-3g_common.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index adfbeb50..5889d1bd 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -877,7 +877,8 @@ void close_reparse_plugins(ntfs_fuse_context_t *ctx) * does not harm Windows). */ -BOOL user_xattrs_allowed(ntfs_fuse_context_t *ctx, ntfs_inode *ni) +BOOL user_xattrs_allowed(ntfs_fuse_context_t *ctx __attribute__((unused)), + ntfs_inode *ni) { u32 dt_type; BOOL res; @@ -903,10 +904,10 @@ BOOL user_xattrs_allowed(ntfs_fuse_context_t *ctx, ntfs_inode *ni) || S_ISDIR(stbuf.st_mode); } free(reparse); + } #else /* PLUGINS_DISABLED */ res = FALSE; /* mountpoints, symlinks, ... */ #endif /* PLUGINS_DISABLED */ - } } else { /* Metadata */ if (ni->mft_no < FILE_first_user) diff --git a/src/ntfs-3g_common.h b/src/ntfs-3g_common.h index e9026576..65fbae61 100644 --- a/src/ntfs-3g_common.h +++ b/src/ntfs-3g_common.h @@ -200,6 +200,7 @@ int ntfs_parse_options(struct ntfs_options *popts, void (*usage)(void), int ntfs_fuse_listxattr_common(ntfs_inode *ni, ntfs_attr_search_ctx *actx, char *list, size_t size, BOOL prefixing); +BOOL user_xattrs_allowed(ntfs_fuse_context_t *ctx, ntfs_inode *ni); #ifndef PLUGINS_DISABLED @@ -208,7 +209,6 @@ const struct plugin_operations *select_reparse_plugin(ntfs_fuse_context_t *ctx, ntfs_inode *ni, REPARSE_POINT **reparse); int register_reparse_plugin(ntfs_fuse_context_t *ctx, le32 tag, const plugin_operations_t *ops, void *handle); -BOOL user_xattrs_allowed(ntfs_fuse_context_t *ctx, ntfs_inode *ni); #endif /* PLUGINS_DISABLED */