aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_lowlevel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r--include/fuse_lowlevel.h83
1 files changed, 56 insertions, 27 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index 2036717..0a1d5f5 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -44,7 +44,7 @@ extern "C" {
#define FUSE_ROOT_ID 1
/** Inode number type */
-typedef unsigned long fuse_ino_t;
+typedef uint64_t fuse_ino_t;
/** Request pointer type */
typedef struct fuse_req *fuse_req_t;
@@ -122,7 +122,7 @@ struct fuse_ctx {
};
struct fuse_forget_data {
- uint64_t ino;
+ fuse_ino_t ino;
uint64_t nlookup;
};
@@ -1016,6 +1016,32 @@ struct fuse_lowlevel_ops {
*/
void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode,
off_t offset, off_t length, struct fuse_file_info *fi);
+
+ /**
+ * Read directory with attributes
+ *
+ * Send a buffer filled using fuse_add_direntry_plus(), with size not
+ * exceeding the requested size. Send an empty buffer on end of
+ * stream.
+ *
+ * fi->fh will contain the value set by the opendir method, or
+ * will be undefined if the opendir method didn't set any value.
+ *
+ * Introduced in version 3.0
+ *
+ * Valid replies:
+ * fuse_reply_buf
+ * fuse_reply_data
+ * fuse_reply_err
+ *
+ * @param req request handle
+ * @param ino the inode number
+ * @param size maximum number of bytes to send
+ * @param off offset to continue reading the directory stream
+ * @param fi file information
+ */
+ void (*readdirplus) (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
+ struct fuse_file_info *fi);
};
/**
@@ -1252,6 +1278,34 @@ size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize,
off_t off);
/**
+ * Add a directory entry to the buffer with the attributes
+ *
+ * Buffer needs to be large enough to hold the entry. If it's not,
+ * then the entry is not filled in but the size of the entry is still
+ * returned. The caller can check this by comparing the bufsize
+ * parameter with the returned entry size. If the entry size is
+ * larger than the buffer size, the operation failed.
+ *
+ * From the 'stbuf' argument the st_ino field and bits 12-15 of the
+ * st_mode field are used. The other fields are ignored.
+ *
+ * Note: offsets do not necessarily represent physical offsets, and
+ * could be any marker, that enables the implementation to find a
+ * specific point in the directory stream.
+ *
+ * @param req request handle
+ * @param buf the point where the new entry will be added to the buffer
+ * @param bufsize remaining size of the buffer
+ * @param name the name of the entry
+ * @param e the directory entry
+ * @param off the offset of the next entry
+ * @return the space needed for the entry
+ */
+size_t fuse_add_direntry_plus(fuse_req_t req, char *buf, size_t bufsize,
+ const char *name,
+ const struct fuse_entry_param *e, off_t off);
+
+/**
* Reply to ask for data fetch and output buffer preparation. ioctl
* will be retried with the specified input data fetched and output
* buffer prepared.
@@ -1491,9 +1545,6 @@ int fuse_req_interrupted(fuse_req_t req);
* Filesystem setup *
* ----------------------------------------------------------- */
-/* Deprecated, don't use */
-int fuse_lowlevel_is_lib_option(const char *opt);
-
/**
* Create a low level session
*
@@ -1808,28 +1859,6 @@ int fuse_chan_send(struct fuse_chan *ch, const struct iovec iov[],
*/
void fuse_chan_destroy(struct fuse_chan *ch);
-/* ----------------------------------------------------------- *
- * Compatibility stuff *
- * ----------------------------------------------------------- */
-
-#if FUSE_USE_VERSION < 26
-# include "fuse_lowlevel_compat.h"
-# define fuse_chan_ops fuse_chan_ops_compat24
-# define fuse_chan_new fuse_chan_new_compat24
-# if FUSE_USE_VERSION == 25
-# define fuse_lowlevel_ops fuse_lowlevel_ops_compat25
-# define fuse_lowlevel_new fuse_lowlevel_new_compat25
-# elif FUSE_USE_VERSION == 24
-# define fuse_lowlevel_ops fuse_lowlevel_ops_compat
-# define fuse_lowlevel_new fuse_lowlevel_new_compat
-# define fuse_file_info fuse_file_info_compat
-# define fuse_reply_statfs fuse_reply_statfs_compat
-# define fuse_reply_open fuse_reply_open_compat
-# else
-# error Compatibility with low-level API version < 24 not supported
-# endif
-#endif
-
#ifdef __cplusplus
}
#endif