View | Details | Raw Unified | Return to bug 92568
Collapse All | Expand All

(-)ntfsprogs/Makefile (+1 lines)
Lines 61-66 Link Here
61
PLIST_SUB+=	FUSE=""
61
PLIST_SUB+=	FUSE=""
62
LIB_DEPENDS+=	fuse.2:${PORTSDIR}/sysutils/fusefs-libs
62
LIB_DEPENDS+=	fuse.2:${PORTSDIR}/sysutils/fusefs-libs
63
MLINKS+=	ntfsmount.8 mount.ntfs-fuse.8
63
MLINKS+=	ntfsmount.8 mount.ntfs-fuse.8
64
CONFLICTS=      fusefs-kmod-0.2.19*
64
.else
65
.else
65
CONFIGURE_ARGS+=--disable-fuse-module
66
CONFIGURE_ARGS+=--disable-fuse-module
66
PLIST_SUB+=	FUSE="@comment "
67
PLIST_SUB+=	FUSE="@comment "
(-)ntfsprogs/files/patch-ntfsprogs_ntfsmount.c (-7 / +96 lines)
Lines 1-14 Link Here
1
--- ntfsprogs/ntfsmount.c.orig	Wed Nov 23 12:33:56 2005
1
--- ntfsprogs/Makefile.am.orig	Sat Oct  8 00:35:40 2005
2
+++ ntfsprogs/ntfsmount.c	Wed Nov 23 12:32:15 2005
2
+++ ntfsprogs/Makefile.am	Fri Jan 20 11:26:37 2006
3
@@ -228,7 +228,11 @@
3
@@ -88,7 +88,7 @@
4
 ntfsmount_SOURCES	= ntfsmount.c utils.c utils.h
5
 ntfsmount_LDADD		= $(AM_LIBS) $(FUSE_MODULE_LIBS)
6
 ntfsmount_LDFLAGS	= $(AM_LFLAGS)
7
-ntfsmount_CFLAGS	= $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22
8
+ntfsmount_CFLAGS	= $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
9
 endif
10
 
11
 # We don't distribute these
12
--- ntfsprogs/Makefile.in.orig	Fri Jan 20 11:24:48 2006
13
+++ ntfsprogs/Makefile.in	Fri Jan 20 11:26:40 2006
14
@@ -366,7 +366,7 @@
15
 @ENABLE_FUSE_MODULE_TRUE@ntfsmount_SOURCES = ntfsmount.c utils.c utils.h
16
 @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS)
17
 @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDFLAGS = $(AM_LFLAGS)
18
-@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22
19
+@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
20
 
21
 # We don't distribute these
22
 ntfsrm_SOURCES = ntfsrm.c ntfsrm.h utils.c utils.h
23
--- ntfsprogs/ntfsmount.c.orig	Mon Oct 10 14:47:38 2005
24
+++ ntfsprogs/ntfsmount.c	Fri Jan 20 11:42:09 2006
25
@@ -81,10 +81,10 @@
26
 	int state;
27
 	long free_clusters;
28
 	long free_mft;
29
-	uid_t uid;
30
-	gid_t gid;
31
-	mode_t fmask;
32
-	mode_t dmask;
33
+	unsigned int uid;
34
+	unsigned int gid;
35
+	unsigned int fmask;
36
+	unsigned int dmask;
37
 	BOOL ro;
38
 	BOOL show_sys_files;
39
 	BOOL succeed_chmod;
40
@@ -196,7 +196,7 @@
41
  * Return 0 on success or -errno on error.
42
  */
43
 static int ntfs_fuse_statfs(const char *path __attribute__((unused)),
44
-		struct statfs *sfs)
45
+		struct statvfs *sfs)
46
 {
47
 	long size;
48
 	ntfs_volume *vol;
49
@@ -204,10 +204,10 @@
50
 	vol = ctx->vol;
51
 	if (!vol)
52
 		return -ENODEV;
53
-	/* Type of filesystem. */
54
-	sfs->f_type = NTFS_SB_MAGIC;
55
 	/* Optimal transfer block size. */
56
 	sfs->f_bsize = vol->cluster_size;
57
+	/* XXX This field needs to be filled, I guess it's fine this way... */
58
+	sfs->f_frsize = vol->cluster_size;
59
 	/*
60
 	 * Total data blocks in file system in units of f_bsize and since
61
 	 * inodes are also stored in data blocs ($MFT is a file) this is just
62
@@ -228,7 +228,7 @@
4
 		size = 0;
63
 		size = 0;
5
 	sfs->f_ffree = size;
64
 	sfs->f_ffree = size;
6
 	/* Maximum length of filenames. */
65
 	/* Maximum length of filenames. */
7
+#ifdef __FreeBSD__
66
-	sfs->f_namelen = NTFS_MAX_NAME_LEN;
8
+	sfs->f_namemax = NTFS_MAX_NAME_LEN;
67
+	sfs->f_namemax = NTFS_MAX_NAME_LEN;
9
+#else
10
 	sfs->f_namelen = NTFS_MAX_NAME_LEN;
11
+#endif
12
 	return 0;
68
 	return 0;
13
 }
69
 }
14
 
70
 
71
@@ -1462,8 +1462,9 @@
72
 int main(int argc, char *argv[])
73
 {
74
 	char *parsed_options;
75
+	struct fuse_args margs = FUSE_ARGS_INIT(0, NULL);
76
 	struct fuse *fh;
77
-	int ffd;
78
+	int ffd = 0;
79
 
80
 	utils_set_locale();
81
 	signal(SIGINT, signal_handler);
82
@@ -1491,7 +1492,20 @@
83
 	}
84
 	free(opts.device);
85
 	/* Create filesystem. */
86
-	ffd = fuse_mount(opts.mnt_point, parsed_options);
87
+	/*
88
+	 * XXX Eventually, ntfsmount should drop it's homebrew option parsing
89
+	 * routines and use stock ones. Here we don't go that far, we just use the
90
+	 * FUSE opt parsing API to dummily create the structure which satisfies
91
+	 * fuse_mount's current signature (that is, revert all the work which
92
+	 * has been accomplished by the homebrew routine... silly, eh?).
93
+	 */
94
+	if ((fuse_opt_add_arg(&margs, "") == -1 ||
95
+	     fuse_opt_add_arg(&margs, "-o") == -1 ||
96
+	     fuse_opt_add_arg(&margs, parsed_options) == -1))
97
+		ffd = -1;
98
+	if (ffd != -1)
99
+		ffd = fuse_mount(opts.mnt_point, &margs);
100
+	fuse_opt_free_args(&margs);
101
 	if (ffd == -1) {
102
 		Eprintf("fuse_mount failed.\n");
103
 		ntfs_fuse_destroy();

Return to bug 92568