Hello all,
in case someone is interested:
the attached patch for ntfs-3g-2017.3.23 adds support for fuse-3.
It only patches the ntfs-3g driver, the lowntfs-3g driver is disabled
since I only use the first one.
The patch is rated works_for_me.
diff -Naur ntfs-3g_ntfsprogs-2017.3.23/configure.ac
ntfs-3g_ntfsprogs-2017.3.23-new/configure.ac
--- ntfs-3g_ntfsprogs-2017.3.23/configure.ac 2017-03-23 10:42:44.000000000
+0100
+++ ntfs-3g_ntfsprogs-2017.3.23-new/configure.ac 2019-03-03
15:56:56.043430009 +0100
@@ -321,10 +321,10 @@
export
PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/lib/pkgconfig:/usr/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/usr/share/pkgconfig:/usr/local/lib/pkgconfig:$prefix/lib/pkgconfig:/opt/gnome/share/pkgconfig:/usr/local/share/pkgconfig
PKG_CHECK_MODULES(
[FUSE_MODULE],
- [fuse >= 2.6.0],
+ [fuse3 >= 3.0.0],
,
[
- AC_MSG_ERROR([FUSE >= 2.6.0 was not found. Either older
FUSE is still present, or FUSE is not fully installed (e.g. fuse, libfuse,
libfuse2, libfuse-dev, etc packages). Source code: http://fuse.sf.net])
+ AC_MSG_ERROR([FUSE >= 3.0.0 was not found. Either older
FUSE is still present, or FUSE is not fully installed (e.g. fuse, libfuse,
libfuse2, libfuse-dev, etc packages). Source code: http://fuse.sf.net])
]
)
FUSE_LIB_PATH=`$PKG_CONFIG --libs-only-L fuse | sed -e 's,/[/]*,/,g' -e
's,[ ]*$,,'`
diff -Naur ntfs-3g_ntfsprogs-2017.3.23/src/Makefile.am
ntfs-3g_ntfsprogs-2017.3.23-new/src/Makefile.am
--- ntfs-3g_ntfsprogs-2017.3.23/src/Makefile.am 2017-03-23 10:42:44.000000000
+0100
+++ ntfs-3g_ntfsprogs-2017.3.23-new/src/Makefile.am 2019-03-03
16:00:54.533435407 +0100
@@ -19,7 +19,7 @@
if ENABLE_NTFS_3G
bin_PROGRAMS = ntfs-3g.probe
-rootbin_PROGRAMS = ntfs-3g lowntfs-3g
+rootbin_PROGRAMS = ntfs-3g
rootsbin_DATA = #Create directory
man_MANS = ntfs-3g.8 ntfs-3g.probe.8
@@ -29,7 +29,7 @@
endif
ntfs_3g_CFLAGS = \
$(AM_CFLAGS) \
- -DFUSE_USE_VERSION=26 \
+ -DFUSE_USE_VERSION=30 \
$(FUSE_CFLAGS) \
-I$(top_srcdir)/include/ntfs-3g \
$(PLUGIN_CFLAGS)
@@ -41,7 +41,7 @@
endif
lowntfs_3g_CFLAGS = \
$(AM_CFLAGS) \
- -DFUSE_USE_VERSION=26 \
+ -DFUSE_USE_VERSION=30 \
$(FUSE_CFLAGS) \
-I$(top_srcdir)/include/ntfs-3g \
$(PLUGIN_CFLAGS)
@@ -54,7 +54,7 @@
ntfs_3g_probe_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include/ntfs-3g
ntfs_3g_probe_SOURCES = ntfs-3g.probe.c
-drivers : $(FUSE_LIBS) ntfs-3g lowntfs-3g
+drivers : $(FUSE_LIBS) ntfs-3g
install-exec-hook:
if RUN_LDCONFIG
@@ -68,15 +68,12 @@
install-exec-local: install-rootbinPROGRAMS
$(MKDIR_P) "$(DESTDIR)/sbin"
$(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)/sbin/mount.ntfs-3g"
- $(LN_S) -f "$(rootbindir)/lowntfs-3g" "$(DESTDIR)/sbin/mount.lowntfs-3g"
install-data-local: install-man8
$(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
- $(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.lowntfs-3g.8"
uninstall-local:
$(RM) -f "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
- $(RM) -f "$(DESTDIR)/sbin/mount.ntfs-3g"
"$(DESTDIR)/sbin/mount.lowntfs-3g"
endif
endif # ENABLE_NTFS_3G
diff -Naur ntfs-3g_ntfsprogs-2017.3.23/src/Makefile.in
ntfs-3g_ntfsprogs-2017.3.23-new/src/Makefile.in
--- ntfs-3g_ntfsprogs-2017.3.23/src/Makefile.in 2017-03-23 10:43:00.000000000
+0100
+++ ntfs-3g_ntfsprogs-2017.3.23-new/src/Makefile.in 2019-03-03
15:56:56.043430009 +0100
@@ -395,7 +395,7 @@
@ENABLE_NTFS_3G_TRUE@@REALLYSTATIC_TRUE@ntfs_3g_LDFLAGS = $(AM_LDFLAGS)
-all-static
@ENABLE_NTFS_3G_TRUE@ntfs_3g_CFLAGS = \
@ENABLE_NTFS_3G_TRUE@ $(AM_CFLAGS) \
-@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=26 \
+@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=30 \
@ENABLE_NTFS_3G_TRUE@ $(FUSE_CFLAGS) \
@ENABLE_NTFS_3G_TRUE@ -I$(top_srcdir)/include/ntfs-3g \
@ENABLE_NTFS_3G_TRUE@ $(PLUGIN_CFLAGS)
@@ -405,7 +405,7 @@
@ENABLE_NTFS_3G_TRUE@@REALLYSTATIC_TRUE@lowntfs_3g_LDFLAGS = $(AM_LDFLAGS)
-all-static
@ENABLE_NTFS_3G_TRUE@lowntfs_3g_CFLAGS = \
@ENABLE_NTFS_3G_TRUE@ $(AM_CFLAGS) \
-@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=26 \
+@ENABLE_NTFS_3G_TRUE@ -DFUSE_USE_VERSION=30 \
@ENABLE_NTFS_3G_TRUE@ $(FUSE_CFLAGS) \
@ENABLE_NTFS_3G_TRUE@ -I$(top_srcdir)/include/ntfs-3g \
@ENABLE_NTFS_3G_TRUE@ $(PLUGIN_CFLAGS)
diff -Naur ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c
ntfs-3g_ntfsprogs-2017.3.23-new/src/ntfs-3g.c
--- ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c 2017-03-23 10:42:44.000000000
+0100
+++ ntfs-3g_ntfsprogs-2017.3.23-new/src/ntfs-3g.c 2019-03-03
16:02:56.503438166 +0100
@@ -1257,7 +1257,7 @@
}
#endif /* defined(__APPLE__) || defined(__DARWIN__), ... */
- ret = fill_ctx->filler(fill_ctx->buf, filename, &st, 0);
+ ret = fill_ctx->filler(fill_ctx->buf, filename, &st, 0, 0);
}
free(filename);
@@ -3705,7 +3705,6 @@
.read = ntfs_fuse_read,
.write = ntfs_fuse_write,
.truncate = ntfs_fuse_truncate,
- .ftruncate = ntfs_fuse_ftruncate,
.statfs = ntfs_fuse_statfs,
.chmod = ntfs_fuse_chmod,
.chown = ntfs_fuse_chown,
@@ -3950,9 +3949,9 @@
#endif
-static struct fuse_chan *try_fuse_mount(char *parsed_options)
+static int try_fuse_mount(char *parsed_options, struct fuse *fuse)
{
- struct fuse_chan *fc = NULL;
+ int retval = 0;
struct fuse_args margs = FUSE_ARGS_INIT(0, NULL);
/* The fuse_mount() options get modified, so we always rebuild it */
@@ -3963,11 +3962,10 @@
goto free_args;
}
- fc = fuse_mount(opts.mnt_point, &margs);
+ retval = fuse_mount(fuse, opts.mnt_point);
free_args:
fuse_opt_free_args(&margs);
- return fc;
-
+ return retval;
}
static int set_fuseblk_options(char **parsed_options)
@@ -3994,29 +3992,30 @@
struct fuse *fh = NULL;
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
- ctx->fc = try_fuse_mount(parsed_options);
- if (!ctx->fc)
- return NULL;
-
if (fuse_opt_add_arg(&args, "") == -1)
goto err;
#if !CACHEING
- if (fuse_opt_add_arg(&args, "-ouse_ino,kernel_cache,attr_timeout=0") ==
-1)
+ if (fuse_opt_add_arg(&args, "-okernel_cache,attr_timeout=0") == -1)
goto err;
#else
- if (fuse_opt_add_arg(&args, "-ouse_ino,kernel_cache,attr_timeout=1") ==
-1)
+ if (fuse_opt_add_arg(&args, "-okernel_cache,attr_timeout=1") == -1)
goto err;
#endif
if (ctx->debug)
if (fuse_opt_add_arg(&args, "-odebug") == -1)
goto err;
- fh = fuse_new(ctx->fc, &args , &ntfs_3g_ops, sizeof(ntfs_3g_ops), NULL);
+ fh = fuse_new(&args , &ntfs_3g_ops, sizeof(ntfs_3g_ops), NULL);
if (!fh)
goto err;
- if (fuse_set_signal_handlers(fuse_get_session(fh)))
+ ctx->fuse_session = fuse_get_session(fh);
+ if ( 0 != fuse_set_signal_handlers(ctx->fuse_session))
goto err_destory;
+
+ if ( -1 == try_fuse_mount(parsed_options, fh) )
+ return NULL;
+
out:
fuse_opt_free_args(&args);
return fh;
@@ -4024,7 +4023,7 @@
fuse_destroy(fh);
fh = NULL;
err:
- fuse_unmount(opts.mnt_point, ctx->fc);
+ fuse_unmount(ctx->fuse_session);
goto out;
}
@@ -4303,7 +4302,7 @@
err = 0;
- fuse_unmount(opts.mnt_point, ctx->fc);
+ fuse_unmount(ctx->fuse_session);
fuse_destroy(fh);
err_out:
ntfs_mount_error(opts.device, opts.mnt_point, err);
--- ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g_common.h 2017-03-23
10:42:44.000000000 +0100
+++ ntfs-3g_ntfsprogs-2017.3.23-mod/src/ntfs-3g_common.h 2019-03-03
13:09:09.323527831 +0100
@@ -158,6 +158,7 @@
#endif /* XATTR_MAPPINGS */
#endif /* HAVE_SETXATTR */
struct fuse_chan *fc;
+ struct fuse_session *fuse_session;
BOOL inherit;
unsigned int secure_flags;
single_log_t errors_logged;
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page