diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-07 11:59:00 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-07 11:59:00 +0000 |
commit | 52cb09d16ed7e233c35c0c33e72a952211a056b3 (patch) | |
tree | e13243dd1ac8f5e3eaaf10e11c6d2637b15e9046 /include | |
parent | f7eec0361d3b2465c8cf3449082ee396b016e29b (diff) | |
download | libfuse-52cb09d16ed7e233c35c0c33e72a952211a056b3.tar.gz |
fix up statfs interface
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 18 | ||||
-rw-r--r-- | include/fuse_compat.h | 2 | ||||
-rw-r--r-- | include/fuse_lowlevel.h | 4 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/fuse.h b/include/fuse.h index 329fd5e..831dbff 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -20,7 +20,7 @@ #include <sys/types.h> #include <sys/stat.h> -#include <sys/statfs.h> +#include <sys/statvfs.h> #include <utime.h> #ifdef __cplusplus @@ -162,11 +162,8 @@ struct fuse_operations { int (*write) (const char *, const char *, size_t, off_t, struct fuse_file_info *); - /** Get file system statistics - * - * The 'f_type' and 'f_fsid' fields are ignored - */ - int (*statfs) (const char *, struct statfs *); + /** Old statfs interface, deprecated */ + int (*statfs_old) (const char *, void *stbuf); /** Possibly flush cached data * @@ -352,6 +349,15 @@ struct fuse_operations { * Introduced in version 2.5 */ int (*fgetattr) (const char *, struct stat *, struct fuse_file_info *); + + /** Get file system statistics + * + * The 'f_frsize', 'f_favail', 'f_fsid' and 'f_flag' fields are ignored + * + * Replaced 'struct statfs' parameter with 'struct statvfs' in + * version 2.5 + */ + int (*statfs) (const char *, struct statvfs *stbuf); }; /** Extra context that may be needed by some filesystems diff --git a/include/fuse_compat.h b/include/fuse_compat.h index af7aecf..08d391a 100644 --- a/include/fuse_compat.h +++ b/include/fuse_compat.h @@ -9,6 +9,8 @@ /* these definitions provide source compatibility to prior versions. Do not include this file directly! */ +#include <sys/statfs.h> + typedef int (*fuse_dirfil_t_compat) (fuse_dirh_t h, const char *name, int type); struct fuse_operations_compat2 { int (*getattr) (const char *, struct stat *); diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index a027163..f90d021 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -18,7 +18,7 @@ #include <utime.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/statfs.h> +#include <sys/statvfs.h> #include <sys/uio.h> #ifdef __cplusplus @@ -840,7 +840,7 @@ int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size); * @param stbuf filesystem statistics * @return zero for success, -errno for failure to send reply */ -int fuse_reply_statfs(fuse_req_t req, const struct statfs *stbuf); +int fuse_reply_statfs(fuse_req_t req, const struct statvfs *stbuf); /** * Reply with needed buffer size |