summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2016-11-16 12:44:26 -0800
committerNikolaus Rath <Nikolaus@rath.org>2016-11-16 12:44:26 -0800
commitdddd8196079f8472a7dbb93734cc8e098c9898e7 (patch)
tree6b3c6fec7ff9016514c40761cdf53cf09ebafad7
parente3958ae933a5f689e526624d103ab08a4dd59e8f (diff)
downloadfuse-dddd8196079f8472a7dbb93734cc8e098c9898e7.tar.gz
Fail more nicely on max_read mismatch
Instead of abort()ing, close the session properly and return an error code.
-rw-r--r--lib/fuse_lowlevel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 4cc4193..9fd9144 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1921,7 +1921,10 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
fprintf(stderr, "fuse: error: init() and fuse_session_new() "
"requested different maximum read size (%u vs %u)\n",
se->conn.max_read, max_read_mo);
- abort();
+ fuse_reply_err(req, EPROTO);
+ se->error = -EPROTO;
+ fuse_session_exit(se);
+ return;
}
/* Always enable big writes, this is superseded