aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2017-08-23 23:37:40 +0200
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-08-23 23:38:20 +0200
commitcdea3acc2b065a7da1ff96fbdaf9c854192c189b (patch)
tree78534912cb1b6af939a1fba4dcdde6019c1daf95
parent3e8954279eb2374d8c3905c1b1ff21ea5b97f856 (diff)
fuse_loop_mt(): on error, return errno rather than -1.
-rw-r--r--ChangeLog.rst5
-rw-r--r--lib/fuse_loop_mt.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index ce9ffd7..0b3e886 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,7 +1,10 @@
Unreleased Changes
==================
-* `fuse_loop` no longer returns a positive value if the filesystem
+* `fuse_loop_mt()` now returns the minus the actual errno if there was
+ an error (instead of just -1).
+
+* `fuse_loop()` no longer returns a positive value if the filesystem
loop was terminated without errors or signals.
* Improved documentation of `fuse_lowlevel_notify_*` functions.
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index 42d3e03..74b6c99 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -127,7 +127,7 @@ static void *fuse_do_work(void *data)
if (res <= 0) {
if (res < 0) {
fuse_session_exit(mt->se);
- mt->error = -1;
+ mt->error = res;
}
break;
}