diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-03-17 15:05:40 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-03-17 15:05:40 +0000 |
commit | 6f385414b27e929bd14435ea8342cde4bae0ef8d (patch) | |
tree | c5a557fa053ebd9d96331f9d620d96a80a1282bd /example | |
parent | 9db31dc1cff5ae2e854649f039f319d45eb58cf3 (diff) | |
download | android_external_fuse-6f385414b27e929bd14435ea8342cde4bae0ef8d.tar.gz android_external_fuse-6f385414b27e929bd14435ea8342cde4bae0ef8d.tar.bz2 android_external_fuse-6f385414b27e929bd14435ea8342cde4bae0ef8d.zip |
fix
Diffstat (limited to 'example')
-rw-r--r-- | example/fusexmp.c | 2 | ||||
-rw-r--r-- | example/fusexmp_fh.c | 2 | ||||
-rw-r--r-- | example/hello.c | 2 | ||||
-rw-r--r-- | example/hello_ll.c | 18 | ||||
-rw-r--r-- | example/null.c | 2 |
5 files changed, 10 insertions, 16 deletions
diff --git a/example/fusexmp.c b/example/fusexmp.c index 172dc88..a30c9fd 100644 --- a/example/fusexmp.c +++ b/example/fusexmp.c @@ -369,5 +369,5 @@ static struct fuse_operations xmp_oper = { int main(int argc, char *argv[]) { umask(0); - return fuse_main(argc, argv, &xmp_oper); + return fuse_main(argc, argv, &xmp_oper, NULL); } diff --git a/example/fusexmp_fh.c b/example/fusexmp_fh.c index 89fe8ff..c82d061 100644 --- a/example/fusexmp_fh.c +++ b/example/fusexmp_fh.c @@ -432,5 +432,5 @@ static struct fuse_operations xmp_oper = { int main(int argc, char *argv[]) { umask(0); - return fuse_main(argc, argv, &xmp_oper); + return fuse_main(argc, argv, &xmp_oper, NULL); } diff --git a/example/hello.c b/example/hello.c index 8ab7181..f717c34 100644 --- a/example/hello.c +++ b/example/hello.c @@ -90,5 +90,5 @@ static struct fuse_operations hello_oper = { int main(int argc, char *argv[]) { - return fuse_main(argc, argv, &hello_oper); + return fuse_main(argc, argv, &hello_oper, NULL); } diff --git a/example/hello_ll.c b/example/hello_ll.c index 531d1c9..dbe141c 100644 --- a/example/hello_ll.c +++ b/example/hello_ll.c @@ -149,33 +149,27 @@ static struct fuse_lowlevel_ops hello_ll_oper = { int main(int argc, char *argv[]) { struct fuse_args args = FUSE_ARGS_INIT(argc, argv); + struct fuse_chan *ch; char *mountpoint; int err = -1; - int fd = -1; if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -1 && - (fd = fuse_mount(mountpoint, &args)) != -1) { + (ch = fuse_mount(mountpoint, &args)) != NULL) { struct fuse_session *se; se = fuse_lowlevel_new(&args, &hello_ll_oper, sizeof(hello_ll_oper), NULL); if (se != NULL) { if (fuse_set_signal_handlers(se) != -1) { - struct fuse_chan *ch = fuse_kern_chan_new(fd); - if (ch != NULL) { - fuse_session_add_chan(se, ch); - err = fuse_session_loop(se); - } + fuse_session_add_chan(se, ch); + err = fuse_session_loop(se); fuse_remove_signal_handlers(se); + fuse_session_remove_chan(ch); } - fuse_unmount(mountpoint, fd); fuse_session_destroy(se); - goto out; } - close(fd); + fuse_unmount(mountpoint, ch); } - fuse_unmount(mountpoint, fd); -out: fuse_opt_free_args(&args); return err ? 1 : 0; diff --git a/example/null.c b/example/null.c index 82e7c45..eda843a 100644 --- a/example/null.c +++ b/example/null.c @@ -84,5 +84,5 @@ static struct fuse_operations null_oper = { int main(int argc, char *argv[]) { - return fuse_main(argc, argv, &null_oper); + return fuse_main(argc, argv, &null_oper, NULL); } |