diff options
| author | Simon Barner <barner@FreeBSD.org> | 2005-10-19 08:14:55 +0000 |
|---|---|---|
| committer | Simon Barner <barner@FreeBSD.org> | 2005-10-19 08:14:55 +0000 |
| commit | 8eb435d9d1301d5d6bcfc0ff46031b1889c6cd26 (patch) | |
| tree | 874dc287d18d57d4564ab2c29402075aec275be8 /sysutils/fusefs-libs/files/patch-lib_fuse.c | |
| parent | Update to 2.2.10.alpha. (diff) | |
Add new port for the fuse libraries:
FUSE makes it possible to implement a filesystem in a userspace program.
Features include: simple yet comprehensive API, secure mounting by non-root
users, support for RELENG_6 and HEAD FreeBSD kernels, multi-threaded
operation.
WWW: http://sourceforge.net/projects/fuse/
PR: ports/87167
Submitted by: Anish Mistry <amistry@am-productions.biz>
Reviewed by: Csaba Henk <csaba.henk@creo.hu> (fuse SoC participant)
Notes
Notes:
svn path=/head/; revision=145829
Diffstat (limited to 'sysutils/fusefs-libs/files/patch-lib_fuse.c')
| -rw-r--r-- | sysutils/fusefs-libs/files/patch-lib_fuse.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sysutils/fusefs-libs/files/patch-lib_fuse.c b/sysutils/fusefs-libs/files/patch-lib_fuse.c new file mode 100644 index 000000000000..ffc7224fc47b --- /dev/null +++ b/sysutils/fusefs-libs/files/patch-lib_fuse.c @@ -0,0 +1,52 @@ +--- lib/fuse.c.orig Mon Oct 3 17:02:37 2005 ++++ lib/fuse.c Sun Oct 9 22:05:09 2005 +@@ -1414,7 +1414,12 @@ + + static int default_statfs(struct statfs *buf) + { ++#ifdef __FreeBSD__ ++ buf->f_namemax = 255; ++#else + buf->f_namelen = 255; ++#endif ++ + buf->f_bsize = 512; + return 0; + } +@@ -1428,7 +1433,11 @@ + stbuf->f_bavail = compatbuf->blocks_free; + stbuf->f_files = compatbuf->files; + stbuf->f_ffree = compatbuf->files_free; ++#ifdef __FreeBSD__ ++ stbuf->f_namemax = compatbuf->namelen; ++#else + stbuf->f_namelen = compatbuf->namelen; ++#endif + } + + static void fuse_statfs(fuse_req_t req) +@@ -1761,8 +1770,10 @@ + f->flags |= FUSE_HARD_REMOVE; + else if (strcmp(opt, "use_ino") == 0) + f->flags |= FUSE_USE_INO; ++#ifndef FreeBSD + else if (strcmp(opt, "readdir_ino") == 0) + f->flags |= FUSE_READDIR_INO; ++#endif + else if (strcmp(opt, "direct_io") == 0) + f->flags |= FUSE_DIRECT_IO; + else if (strcmp(opt, "kernel_cache") == 0) +@@ -1787,6 +1798,13 @@ + else + free(xopts); + } ++#ifdef __FreeBSD__ ++ /* ++ * In FreeBSD, we always use these settings as inode numbers are needed to ++ * make getcwd(3) work. ++ */ ++ f->flags |= FUSE_READDIR_INO; ++#endif + return 0; + } + |
