Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7616/ntfsprogs
Modified Files:
ntfsmount.c
Log Message:
ntfsmount: Add FreeBSD support.
Index: ntfsmount.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -p -r1.65 -r1.66
--- ntfsmount.c 27 Nov 2005 16:50:45 -0000 1.65
+++ ntfsmount.c 29 Nov 2005 17:57:53 -0000 1.66
@@ -71,6 +71,14 @@
#define PATH_MAX 4096
#endif
+#ifdef __FreeBSD__
+#undef FUSE_USE_VERSION
+#define FUSE_USE_VERSION 25
+typedef struct statvfs nf_statfs;
+#else
+typedef struct statfs nf_statfs;
+#endif /* __FreeBSD__ */
+
typedef struct {
fuse_fill_dir_t filler;
void *buf;
@@ -183,7 +191,7 @@ static long ntfs_fuse_get_nr_free_cluste
return nr_free;
}
-static __inline__ void ntfs_fuse_mark_free_space_outdate()
+static __inline__ void ntfs_fuse_mark_free_space_outdate(void)
{
/* Mark information about free MFT record and clusters outdate. */
ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
@@ -207,7 +215,7 @@ static __inline__ void ntfs_fuse_mark_fr
* Return 0 on success or -errno on error.
*/
static int ntfs_fuse_statfs(const char *path __attribute__((unused)),
- struct statfs *sfs)
+ nf_statfs *sfs)
{
long size;
ntfs_volume *vol;
@@ -215,8 +223,10 @@ static int ntfs_fuse_statfs(const char *
vol = ctx->vol;
if (!vol)
return -ENODEV;
+#ifndef __FreeBSD__
/* Type of filesystem. */
sfs->f_type = NTFS_SB_MAGIC;
+#endif
/* Optimal transfer block size. */
sfs->f_bsize = vol->cluster_size;
/*
@@ -239,7 +249,11 @@ static int ntfs_fuse_statfs(const char *
size = 0;
sfs->f_ffree = size;
/* Maximum length of filenames. */
+#ifndef __FreeBSD__
sfs->f_namelen = NTFS_MAX_NAME_LEN;
+#else
+ sfs->f_namemax = NTFS_MAX_NAME_LEN;
+#endif
return 0;
}
|