NAME
fuse_reply_err,
fuse_reply_buf,
fuse_reply_attr,
fuse_reply_open,
fuse_reply_write,
fuse_reply_entry,
fuse_reply_statfs,
fuse_reply_readlink —
send replies to FUSE
requests
SYNOPSIS
/* -lfuse */
#include <fuse_lowlevel.h>
int
fuse_reply_err(fuse_req_t req,
int errno);
int
fuse_reply_buf(fuse_req_t req,
const char *buf, off_t
size);
int
fuse_reply_attr(fuse_req_t req,
const struct stat *attr, double
attr_timeout);
int
fuse_reply_open(fuse_req_t req,
const struct fuse_file_info *fi);
int
fuse_reply_write(fuse_req_t req,
size_t count);
int
fuse_reply_entry(fuse_req_t req,
const struct fuse_entry_param *e);
int
fuse_reply_statfs(fuse_req_t
req, const struct statvfs *stbuf);
int
fuse_reply_readlink(fuse_req_t
req, char *linkname);
DESCRIPTION
These functions are used in the FUSE low-level API to send responses to requests received from the kernel.
Once called, the request is considered handled and must not be replied to again.
fuse_reply_err(req, errno)- Send an error response to the request req. The
errno parameter must be a valid (non-negated) error
number, for example
ENOENTorEACCES ..This is a valid response for all file system operations.
fuse_reply_buf(req, buf, size)- Send a buffer buf of size
bytes of data to the kernel.
This is a valid response for
read() andreaddir() operations. fuse_reply_attr(req, attr, attr_timeout)- Replies with file attributes specified in attr,
valid for attr_timeout seconds. The
OpenBSD kernel does not currently support
attribute caching and attr_timeout will be ignored.
This is a valid response for
getattr() andsetattr() operations. fuse_reply_open(req, ffi)- Send a response to an open request with the file info structure
ffi. Only the fh member of
ffi is used.
This is a valid response for
open() andopendir() operations. fuse_reply_write(req, count)- Reply to a write request with the count of bytes
written.
This is a valid response for the
write() operation. fuse_reply_entry(req, e)- Reply to a lookup or other request that results in new file creation with
the details of the new directory entry e, which is
defined as follows:
struct fuse_entry_param { ino_t ino; /* inode number of the entry */ unsigned long generation; /* must be non-zero */ struct stat attr; /* attributes of the entry */ double attr_timeout; /* ignored */ double entry_timeout; /* ignored */ };The OpenBSD kernel does not currently cache FUSE lookups or attributes and the attr_timeout and entry_timeout members are ignored.
This is a valid response for the
lookup(),mknod(),mkdir(),symlink(), andlink() operations. fuse_reply_statfs(req, stbuf)- Reply with file system statistics provided in stbuf.
This is a valid response for the
statfs() operation. fuse_reply_readlink(req, link)- Replies to a readlink request with the symbolic link path
link. The target string cannot contain the NUL
character.
This is a valid response for the
readlink() operation.
RETURN VALUES
All functions return 0 on success. On failure, they return -errno to indicate the error.
SEE ALSO
STANDARDS
These library functions conform to FUSE 2.6.
HISTORY
These library functions have been available since OpenBSD 7.9.
AUTHORS
Helg Bredow <helg@openbsd.org>