diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-08-14 21:37:02 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2018-10-10 10:49:48 +0100 |
commit | 610125f3c157499b3c0695dacf13c103b9cb6554 (patch) | |
tree | 33a762a119f3283edb2726bcdbc2d2793f9d2e26 /example/passthrough_ll.c | |
parent | dd8d21296c203e0196f0bca624ba7f674b93a877 (diff) | |
download | libfuse-610125f3c157499b3c0695dacf13c103b9cb6554.tar.gz |
passthrough_ll: add is_symlink to lo_inode
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'example/passthrough_ll.c')
-rw-r--r-- | example/passthrough_ll.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c index 4c4f68a..700483f 100644 --- a/example/passthrough_ll.c +++ b/example/passthrough_ll.c @@ -69,6 +69,7 @@ struct lo_inode { struct lo_inode *next; /* protected by lo->mutex */ struct lo_inode *prev; /* protected by lo->mutex */ int fd; + bool is_symlink; ino_t ino; dev_t dev; uint64_t refcount; /* protected by lo->mutex */ @@ -193,6 +194,7 @@ static int lo_do_lookup(fuse_req_t req, fuse_ino_t parent, const char *name, if (!inode) goto out_err; + inode->is_symlink = S_ISLNK(e->attr.st_mode); inode->refcount = 1; inode->fd = newfd; inode->ino = e->attr.st_ino; @@ -612,6 +614,7 @@ int main(int argc, char *argv[]) lo.debug = opts.debug; lo.root.refcount = 2; + lo.root.is_symlink = false; lo.root.fd = open("/", O_PATH); if (lo.root.fd == -1) err(1, "open(\"/\", O_PATH)"); |