Date: Tue, 4 Oct 2005 22:10:58 GMT From: soc-chenk <soc-chenk@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 84822 for review Message-ID: <200510042210.j94MAwmr069878@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=84822 Change 84822 by soc-chenk@soc-chenk_leavemealone on 2005/10/04 22:10:14 Fixes in library patch Submitted by: soc-chenk Affected files ... .. //depot/projects/soc2005/fuse4bsd2/Changelog#14 edit .. //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0-rc1.diff#2 edit Differences ... ==== //depot/projects/soc2005/fuse4bsd2/Changelog#14 (text+ko) ==== @@ -1,3 +1,8 @@ +Tue Oct 4 23:16:26 CEST 2005 at node: creo.hu, nick: csaba + * Fixes in library patch + - trying again to get mknod right + - let "use_ino" option take effect + Fri Sep 30 16:18:46 CEST 2005 at node: creo.hu, nick: csaba * removed superfluous unlock in fuse_root ==== //depot/projects/soc2005/fuse4bsd2/fuselib/fuselib-2.4.0-rc1.diff#2 (text+ko) ==== @@ -1,6 +1,6 @@ diff -Naur linuxfuse/example/fusexmp.c bsdfuse/example/fusexmp.c --- linuxfuse/example/fusexmp.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp.c Fri Sep 30 11:34:16 2005 ++++ bsdfuse/example/fusexmp.c Tue Oct 4 23:02:55 2005 @@ -20,7 +20,12 @@ #include <fcntl.h> #include <dirent.h> @@ -14,7 +14,7 @@ #ifdef HAVE_SETXATTR #include <sys/xattr.h> #endif -@@ -79,7 +84,17 @@ +@@ -79,7 +84,20 @@ { int res; @@ -25,8 +25,11 @@ + res = mknod(path, mode, rdev); + else if (mode & S_IFIFO) + res = mkfifo(path, mode); -+ else ++ else { + res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); ++ if (res >= 0) ++ res = close(res); ++ } +#endif + if(res == -1) @@ -34,7 +37,7 @@ diff -Naur linuxfuse/example/fusexmp_fh.c bsdfuse/example/fusexmp_fh.c --- linuxfuse/example/fusexmp_fh.c Tue Sep 13 21:26:12 2005 -+++ bsdfuse/example/fusexmp_fh.c Fri Sep 30 11:34:00 2005 ++++ bsdfuse/example/fusexmp_fh.c Tue Oct 4 23:04:44 2005 @@ -17,7 +17,12 @@ #include <fcntl.h> #include <dirent.h> @@ -60,7 +63,7 @@ break; } -@@ -87,7 +96,17 @@ +@@ -87,7 +96,20 @@ { int res; @@ -71,18 +74,23 @@ + res = mknod(path, mode, rdev); + else if (mode & S_IFIFO) + res = mkfifo(path, mode); -+ else ++ else { + res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); ++ if (res >= 0) ++ res = close(res); ++ } +#endif + if(res == -1) return -errno; -@@ -268,9 +287,11 @@ +@@ -268,9 +290,13 @@ int res; (void) path; -+#ifndef __FreeBSD__ ++#ifdef __FreeBSD__ ++ (void) isdatasync; ++#else if (isdatasync) res = fdatasync(fi->fh); else @@ -124,7 +132,7 @@ #ifdef __cplusplus diff -Naur linuxfuse/lib/fuse.c bsdfuse/lib/fuse.c --- linuxfuse/lib/fuse.c Thu Sep 8 17:16:49 2005 -+++ bsdfuse/lib/fuse.c Fri Sep 30 11:29:31 2005 ++++ bsdfuse/lib/fuse.c Fri Sep 30 17:59:29 2005 @@ -1414,7 +1414,12 @@ static int default_statfs(struct statfs *buf) @@ -150,20 +158,18 @@ } static void fuse_statfs(fuse_req_t req) -@@ -1759,10 +1768,12 @@ - *d++ = ','; - } else if (strcmp(opt, "hard_remove") == 0) +@@ -1761,8 +1770,10 @@ f->flags |= FUSE_HARD_REMOVE; -+#ifndef FreeBSD 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,14 @@ +@@ -1787,6 +1798,13 @@ else free(xopts); } @@ -172,7 +178,6 @@ + * In FreeBSD, we always use these settings as inode numbers are needed to + * make getcwd(3) work. + */ -+ f->flags &= ~FUSE_USE_INO; + f->flags |= FUSE_READDIR_INO; +#endif return 0; @@ -207,7 +212,7 @@ in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && diff -Naur linuxfuse/lib/helper.c bsdfuse/lib/helper.c --- linuxfuse/lib/helper.c Mon Aug 15 16:03:59 2005 -+++ bsdfuse/lib/helper.c Fri Sep 30 11:29:31 2005 ++++ bsdfuse/lib/helper.c Fri Sep 30 17:57:56 2005 @@ -22,7 +22,11 @@ { if (progname) @@ -220,12 +225,11 @@ fprintf(stderr, "FUSE options:\n" -@@ -44,12 +48,20 @@ - " hard_remove immediate removal (don't hide files)\n" +@@ -45,11 +49,19 @@ " debug enable debug output\n" " fsname=NAME set filesystem name in mtab\n" + " use_ino let filesystem set inode numbers\n" +#ifndef __FreeBSD__ - " use_ino let filesystem set inode numbers\n" " readdir_ino try to fill in d_ino in readdir\n" +#endif " nonempty allow mounts over non-empty file/dir\n"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510042210.j94MAwmr069878>