aboutsummaryrefslogtreecommitdiffstats
path: root/example/hello_ll.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba.henk@creo.hu>2006-03-01 09:40:35 +0000
committerCsaba Henk <csaba.henk@creo.hu>2006-03-01 09:40:35 +0000
commitee588c01dca3991807aea456a66246ff8ad0c332 (patch)
tree495e5e37dc07b9049df2650a5866eaf80d7d145d /example/hello_ll.c
parentaa8258e9fb887d45c0a5754f158015e035ce37bc (diff)
downloadlibfuse-ee588c01dca3991807aea456a66246ff8ad0c332.tar.gz
pass device file descriptor to fuse_unmount
Diffstat (limited to 'example/hello_ll.c')
-rw-r--r--example/hello_ll.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/example/hello_ll.c b/example/hello_ll.c
index 2213285..531d1c9 100644
--- a/example/hello_ll.c
+++ b/example/hello_ll.c
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
char *mountpoint;
int err = -1;
- int fd;
+ int fd = -1;
if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -1 &&
(fd = fuse_mount(mountpoint, &args)) != -1) {
@@ -168,11 +168,14 @@ int main(int argc, char *argv[])
}
fuse_remove_signal_handlers(se);
}
+ fuse_unmount(mountpoint, fd);
fuse_session_destroy(se);
+ goto out;
}
close(fd);
}
- fuse_unmount(mountpoint);
+ fuse_unmount(mountpoint, fd);
+out:
fuse_opt_free_args(&args);
return err ? 1 : 0;