From 1d9f26f3736cc4703c2e988d87f5dd119bcd736d Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Thu, 20 Oct 2016 15:45:32 -0700 Subject: Turn fuse_operations.nopath_flag into fuse_config.nullpath_ok Modifying struct fuse_config in the init() handler is the canonical way to adjust file-system implementation specific settings. There is no need to have flags in struct fuse_operations. --- include/fuse.h | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'include/fuse.h') diff --git a/include/fuse.h b/include/fuse.h index 3c13c14..e8ff936 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -243,6 +243,19 @@ struct fuse_config { int ac_attr_timeout_set; double ac_attr_timeout; + /** + * If this option is given the file-system handlers for the + * following operations will not receive path information: + * read, write, flush, release, fsync, readdir, releasedir, + * 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). + */ + int nullpath_ok; + /** * The remaining options are used by libfuse internally and * should not be touched. @@ -250,7 +263,6 @@ struct fuse_config { int show_help; char *modules; int debug; - int nopath; }; @@ -277,30 +289,6 @@ struct fuse_config { * is also a snapshot of the relevant wiki pages in the doc/ folder. */ struct fuse_operations { - /** - * Flag indicating that the path need not be calculated for - * the following operations: - * - * read, write, flush, release, fsync, readdir, releasedir, - * fsyncdir, lock, ioctl and poll - * - * For the following operations, the path will not be - * calculated only if the file is currently open (i.e., the - * struct fuse_file_info argument is non-NULL): - * - * truncate, getattr, chmod, chown, utimens - * - * If this flag is set then the path will not be calculaged even if the - * file wasn't unlinked. However the path can still be non-NULL if it - * needs to be calculated for some other reason. - */ - unsigned int flag_nopath:1; - - /** - * Reserved flags, don't set - */ - unsigned int flag_reserved:31; - /** Get file attributes. * * Similar to stat(). The 'st_dev' and 'st_blksize' fields are -- cgit v1.2.3