From ee588c01dca3991807aea456a66246ff8ad0c332 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 1 Mar 2006 09:40:35 +0000 Subject: pass device file descriptor to fuse_unmount --- example/hello_ll.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'example/hello_ll.c') 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; -- cgit v1.2.3