diff options
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r-- | lib/fuse_lowlevel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index f2d7038..334b497 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -450,6 +450,11 @@ int fuse_reply_readlink(fuse_req_t req, const char *linkname) return send_reply_ok(req, linkname, strlen(linkname)); } +int fuse_reply_canonical_path(fuse_req_t req, const char *path) +{ + return send_reply_ok(req, path, strlen(path)); +} + int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *f) { struct fuse_open_out arg; @@ -1202,6 +1207,16 @@ static void do_readlink(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) fuse_reply_err(req, ENOSYS); } +static void do_canonical_path(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) +{ + (void) inarg; + + if (req->se->op.canonical_path) + req->se->op.canonical_path(req, nodeid); + else + fuse_reply_err(req, ENOSYS); +} + static void do_mknod(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) { struct fuse_mknod_in *arg = (struct fuse_mknod_in *) inarg; @@ -2456,6 +2471,7 @@ static struct { [FUSE_GETATTR] = { do_getattr, "GETATTR" }, [FUSE_SETATTR] = { do_setattr, "SETATTR" }, [FUSE_READLINK] = { do_readlink, "READLINK" }, + [FUSE_CANONICAL_PATH] = { do_canonical_path, "CANONICAL_PATH" }, [FUSE_SYMLINK] = { do_symlink, "SYMLINK" }, [FUSE_MKNOD] = { do_mknod, "MKNOD" }, [FUSE_MKDIR] = { do_mkdir, "MKDIR" }, |