upgrade to FUSE API version 26 (FUSE 2.6.0) -- features, fixes require this
parent
f8d6b01e99
commit
fc448b311e
|
@ -23,7 +23,7 @@
|
|||
#
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([ntfs-3g],[0.20061031-BETA],[ntfs-3g-devel@lists.sf.net])
|
||||
AC_INIT([ntfs-3g],[0.20061110-BETA-CVS],[ntfs-3g-devel@lists.sf.net])
|
||||
|
||||
AC_CANONICAL_HOST([])
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
@ -80,9 +80,9 @@ AC_SYS_LARGEFILE
|
|||
|
||||
case "$target_os" in
|
||||
linux*)
|
||||
PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.5.0, [ compile_fuse_module=true ],
|
||||
PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.6.0, [ compile_fuse_module=true ],
|
||||
[
|
||||
AC_MSG_ERROR([ntfs-3g requires FUSE >= 2.5.0. Please see http://fuse.sf.net/ or install __all__ the precompiled fuse packages.])
|
||||
AC_MSG_ERROR([ntfs-3g requires FUSE >= 2.6.0. Please see http://fuse.sf.net/ or install __all__ FUSE packages (e.g. fuse, fuse-utils, libfuse, libfuse2, libfuse-dev) or remove already installed __older__ FUSE.])
|
||||
]);;
|
||||
*)
|
||||
AC_MSG_ERROR([ntfs-3g can be built only under Linux.])
|
||||
|
|
|
@ -25,7 +25,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs-3g $(all_includes)
|
|||
ntfs_3g_SOURCES = ntfs-3g.c utils.c utils.h
|
||||
ntfs_3g_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS)
|
||||
ntfs_3g_LDFLAGS = $(AM_LFLAGS)
|
||||
ntfs_3g_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
|
||||
ntfs_3g_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=26
|
||||
|
||||
# Extra targets
|
||||
|
||||
|
|
|
@ -1928,7 +1928,7 @@ int main(int argc, char *argv[])
|
|||
char *parsed_options;
|
||||
struct fuse_args margs = FUSE_ARGS_INIT(0, NULL);
|
||||
struct fuse *fh;
|
||||
int ffd = 0;
|
||||
struct fuse_chan *fc;
|
||||
|
||||
utils_set_locale();
|
||||
ntfs_log_set_handler(ntfs_log_handler_stderr);
|
||||
|
@ -1966,14 +1966,14 @@ int main(int argc, char *argv[])
|
|||
goto mount_failed;
|
||||
}
|
||||
|
||||
ffd = fuse_mount(opts.mnt_point, &margs);
|
||||
if (ffd == -1) {
|
||||
fc = fuse_mount(opts.mnt_point, &margs);
|
||||
if (!fc) {
|
||||
if (errno == ENOENT || errno == ENODEV) {
|
||||
ntfs_log_error("Retrying mount ...\n");
|
||||
load_fuse_module(1);
|
||||
ffd = fuse_mount(opts.mnt_point, &margs);
|
||||
fc = fuse_mount(opts.mnt_point, &margs);
|
||||
}
|
||||
if (ffd == -1) {
|
||||
if (!fc) {
|
||||
mount_failed:
|
||||
ntfs_log_error("Failed to mount NTFS\n");
|
||||
fuse_opt_free_args(&margs);
|
||||
|
@ -1998,13 +1998,12 @@ mount_failed:
|
|||
fh = NULL;
|
||||
}
|
||||
if (fh)
|
||||
fh = fuse_new(ffd, &margs , &ntfs_fuse_oper,
|
||||
sizeof(ntfs_fuse_oper));
|
||||
fh = fuse_new(fc, &margs , &ntfs_fuse_oper,
|
||||
sizeof(ntfs_fuse_oper), NULL);
|
||||
fuse_opt_free_args(&margs);
|
||||
if (!fh) {
|
||||
ntfs_log_error("fuse_new failed.\n");
|
||||
close(ffd);
|
||||
fuse_unmount(opts.mnt_point);
|
||||
fuse_unmount(opts.mnt_point, fc);
|
||||
ntfs_fuse_destroy();
|
||||
return 6;
|
||||
}
|
||||
|
@ -2027,8 +2026,7 @@ mount_failed:
|
|||
fuse_loop(fh);
|
||||
|
||||
fuse_destroy(fh);
|
||||
close(ffd);
|
||||
fuse_unmount(opts.mnt_point);
|
||||
fuse_unmount(opts.mnt_point, fc);
|
||||
ntfs_fuse_destroy();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue