Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357:/tmp/cvs-serv10507/ntfsprogs
Modified Files:
Makefile.am ntfsmount.c
Log Message:
upgrade to FUSE 2.6 API
Index: Makefile.am
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/Makefile.am,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- Makefile.am 17 Jul 2006 11:49:52 -0000 1.59
+++ Makefile.am 6 Nov 2006 12:51:44 -0000 1.60
@@ -88,7 +88,7 @@ if ENABLE_FUSE_MODULE
ntfsmount_SOURCES = ntfsmount.c utils.c utils.h
ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS)
ntfsmount_LDFLAGS = $(AM_LFLAGS)
-ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
+ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=26
endif
ntfscmp_SOURCES = ntfscmp.c utils.c utils.h
Index: ntfsmount.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- ntfsmount.c 5 Nov 2006 21:40:57 -0000 1.89
+++ ntfsmount.c 6 Nov 2006 12:51:45 -0000 1.90
@@ -1766,7 +1766,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 *fch;
utils_set_locale();
ntfs_log_set_handler(ntfs_log_handler_stderr);
@@ -1792,15 +1792,14 @@ int main(int argc, char *argv[])
return 4;
}
/* Create filesystem. */
- if ((fuse_opt_add_arg(&margs, "") == -1 ||
+ fch = NULL;
+ if (!(fuse_opt_add_arg(&margs, "") == -1 ||
fuse_opt_add_arg(&margs, "-o") == -1 ||
- fuse_opt_add_arg(&margs, parsed_options) == -1))
- ffd = -1;
- if (ffd != -1)
- ffd = fuse_mount(opts.mnt_point, &margs);
+ fuse_opt_add_arg(&margs, parsed_options)))
+ fch = fuse_mount(opts.mnt_point, &margs);
fuse_opt_free_args(&margs);
free(parsed_options);
- if (ffd == -1) {
+ if (!fch) {
ntfs_log_error("fuse_mount failed.\n");
ntfs_fuse_destroy();
return 5;
@@ -1818,13 +1817,12 @@ int main(int argc, char *argv[])
fh = NULL;
}
if (fh)
- fh = fuse_new(ffd, &margs , &ntfs_fuse_oper,
- sizeof(ntfs_fuse_oper));
+ fh = fuse_new(fch, &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, fch);
ntfs_fuse_destroy();
return 6;
}
@@ -1846,9 +1844,8 @@ int main(int argc, char *argv[])
/* Main loop. */
fuse_loop(fh);
/* Destroy. */
+ fuse_unmount(opts.mnt_point, fch);
fuse_destroy(fh);
- close(ffd);
- fuse_unmount(opts.mnt_point);
ntfs_fuse_destroy();
return 0;
}
|