From cdea3acc2b065a7da1ff96fbdaf9c854192c189b Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Wed, 23 Aug 2017 23:37:40 +0200 Subject: fuse_loop_mt(): on error, return errno rather than -1. --- ChangeLog.rst | 5 ++++- lib/fuse_loop_mt.c | 2 +- 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; } -- cgit v1.2.3