Fix documentation: fuse_file_info may be NULL for open files
authorNikolaus Rath <Nikolaus@rath.org>
Mon, 7 Nov 2016 05:47:56 +0000 (21:47 -0800)
committerNikolaus Rath <Nikolaus@rath.org>
Mon, 7 Nov 2016 05:47:56 +0000 (21:47 -0800)
This turns issue #62 from a bug into an enhancement :-).

ChangeLog.rst
include/fuse.h

index e3529b385a8270bd4c8ad3973ebcb323be8516b2..0a2c503ba8676e10c5dd2d37612eee7ff968b547 100644 (file)
@@ -1,6 +1,10 @@
 Unreleased Changes
 ==================
 
+* Fixed documentation of chmod, chown, truncate, utimens and getattr
+  handlers. The struct fuse_file_info pointer may be NULL even if the
+  file is open.
+
 * The fusermount and mount.fuse binaries have been renamed to
   fusermount3 and mount.fuse3 to allow co-installation of libfuse 2.x
   and 3.x
index 399d1040128301435443c8e98e9e67390e3ecb93..682f731968b46dc1aa73265029117c128b1bda8e 100644 (file)
@@ -250,9 +250,8 @@ struct fuse_config {
         * fsyncdir, lock, ioctl and poll.
         *
         * For the truncate, getattr, chmod, chown and utimens
-        * operations the path will be provided only if the file is
-        * not currently open (i.e., when the struct fuse_file_info
-        * argument is NULL).
+        * operations the path will be provided only if the struct
+        * fuse_file_info argument is NULL.
         */
        int nullpath_ok;
 
@@ -295,7 +294,8 @@ struct fuse_operations {
         * ignored. The 'st_ino' field is ignored except if the 'use_ino'
         * mount option is given.
         *
-        * *fi* will be NULL if the file is not currenly opened.
+        * `fi` will always be NULL if the file is not currenly open, but
+        * may also be NULL if the file is open.
         */
        int (*getattr) (const char *, struct stat *, struct fuse_file_info *fi);
 
@@ -342,19 +342,22 @@ struct fuse_operations {
 
        /** Change the permission bits of a file
         *
-        * *fi* will be NULL if the file is not currenly opened.
+        * `fi` will always be NULL if the file is not currenly open, but
+        * may also be NULL if the file is open.
         */
        int (*chmod) (const char *, mode_t, struct fuse_file_info *fi);
 
        /** Change the owner and group of a file
         *
-        * *fi* will be NULL if the file is not currenly opened.
+        * `fi` will always be NULL if the file is not currenly open, but
+        * may also be NULL if the file is open.
         */
        int (*chown) (const char *, uid_t, gid_t, struct fuse_file_info *fi);
 
        /** Change the size of a file
         *
-        * *fi* will be NULL if the file is not currenly opened.
+        * `fi` will always be NULL if the file is not currenly open, but
+        * may also be NULL if the file is open.
         */
        int (*truncate) (const char *, off_t, struct fuse_file_info *fi);
 
@@ -577,7 +580,8 @@ struct fuse_operations {
         * This supersedes the old utime() interface.  New applications
         * should use this.
         *
-        * *fi* will be NULL if the file is not currenly opened.
+        * `fi` will always be NULL if the file is not currenly open, but
+        * may also be NULL if the file is open.
         *
         * See the utimensat(2) man page for details.
         */