diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2022-03-14 09:25:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 09:25:00 +0000 |
commit | 66b04453b7a5d7aefa0a55e9101afe0347215128 (patch) | |
tree | 6420fbb2ddc1c8f04f6c4a05633401d3ceca68e1 | |
parent | 435a14e0297cf796a19aaf04221fa14957fb3717 (diff) | |
parent | 3c2ba7aa2500618b7b11255ef3f699d6615ad5a2 (diff) | |
download | fuse-66b04453b7a5d7aefa0a55e9101afe0347215128.tar.gz |
Merge branch 'master' into fopen_noflush
-rw-r--r-- | ChangeLog.rst | 8 | ||||
-rw-r--r-- | example/printcap.c | 2 | ||||
-rw-r--r-- | lib/fuse.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst index 96f4fb7..3c3be1e 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -3,6 +3,8 @@ Unreleased Changes * Add support for flag FOPEN_NOFLUSH for avoiding flush on close. +* Fixed returning an error condition to ioctl(2) + libfuse 3.10.5 (2021-09-06) =========================== @@ -427,7 +429,7 @@ libfuse 3.0.0 (2016-12-08) * The ``-o nopath`` option has been dropped - it never actually did anything (since it is unconditionally overwritten with the value of - the `nopath` flag in `struct fuse_operations). + the `nopath` flag in `struct fuse_operations`). * The ``-o large_read`` mount option has been dropped. Hopefully no one uses a Linux 2.4 kernel anymore. @@ -451,7 +453,7 @@ libfuse 3.0.0 (2016-12-08) * The `fuse_session_new` function no longer accepts the ``-o clone_fd`` option. Instead, this has become a parameter of the - `fuse_session_loop_mt` and ``fuse_loop_mt` functions. + `fuse_session_loop_mt` and `fuse_loop_mt` functions. * For low-level file systems that implement the `write_buf` handler, the `splice_read` option is now enabled by default. As usual, this @@ -641,7 +643,7 @@ libfuse 3.0.0 (2016-12-08) * The *fuse_off_t* and *fuse_ino_t* changed from *unsigned long* to *uint64_t*, i.e. they are now 64 bits also on 32-bit systems. -* The type of the *generation* member of `struct fuse_entry_param* +* The type of the *generation* member of `struct fuse_entry_param*` changed from *unsigned* to *uint64_t*. * The (low-level) `setattr` handler gained a *FUSE_SET_ATTR_CTIME* bit diff --git a/example/printcap.c b/example/printcap.c index 472a597..edfd8f5 100644 --- a/example/printcap.c +++ b/example/printcap.c @@ -39,8 +39,6 @@ static void pc_init(void *userdata, printf("Protocol version: %d.%d\n", conn->proto_major, conn->proto_minor); printf("Capabilities:\n"); - if(conn->capable & FUSE_CAP_WRITEBACK_CACHE) - printf("\tFUSE_CAP_WRITEBACK_CACHE\n"); if(conn->capable & FUSE_CAP_ASYNC_READ) printf("\tFUSE_CAP_ASYNC_READ\n"); if(conn->capable & FUSE_CAP_POSIX_LOCKS) @@ -1037,7 +1037,7 @@ static int try_get_path(struct fuse *f, fuse_ino_t nodeid, const char *name, for (node = get_node(f, nodeid); node->nodeid != FUSE_ROOT_ID; node = node->parent) { - err = -ENOENT; + err = -ESTALE; if (node->name == NULL || node->parent == NULL) goto out_unlock; @@ -1246,7 +1246,7 @@ static int get_path_nullok(struct fuse *f, fuse_ino_t nodeid, char **path) *path = NULL; } else { err = get_path_common(f, nodeid, NULL, path, NULL); - if (err == -ENOENT) + if (err == -ESTALE) err = 0; } @@ -4293,6 +4293,8 @@ static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, unsigned int cmd, fuse_finish_interrupt(f, req, &d); free_path(f, ino, path); + if (err < 0) + goto err; fuse_reply_ioctl(req, err, out_buf, out_bufsz); goto out; err: |