libfuse: have passthrough_hp return an error with invalid mount options
authorJosef Bacik <josef@toxicpanda.com>
Fri, 7 Jun 2024 18:49:10 +0000 (14:49 -0400)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Fri, 7 Jun 2024 19:33:04 +0000 (21:33 +0200)
generic/003 fails currently because if you specify -o relatime we will
fail to mount, but not return an error, so the test thinks that we
support relatime and then hilarity ensues.  Set ret so that if we get
any failures while trying to mount we will properly error out.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
example/passthrough_hp.cc

index e780f2387e48a3bf5529359ac53c441c2f8dfa85..02f77f5ae08bca1bc70a8c5c3bdb278367b69027 100644 (file)
@@ -1421,6 +1421,7 @@ int main(int argc, char *argv[]) {
         (fs.debug_fuse && fuse_opt_add_arg(&args, "-odebug")))
         errx(3, "ERROR: Out of memory");
 
+    ret = -1;
     fuse_lowlevel_ops sfs_oper {};
     assign_operations(sfs_oper);
     auto se = fuse_session_new(&args, &sfs_oper, sizeof(sfs_oper), &fs);