From: Nikolaus Rath Date: Wed, 23 Aug 2017 21:37:40 +0000 (+0200) Subject: fuse_loop_mt(): on error, return errno rather than -1. X-Git-Tag: fuse-3.2.0~20 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cdea3acc2b065a7da1ff96fbdaf9c854192c189b;p=qemu-gpiodev%2Flibfuse.git fuse_loop_mt(): on error, return errno rather than -1. --- 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; }