diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-14 23:00:27 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-14 23:00:27 +0000 |
commit | a148242fb80fa2127fdaf41de63e2d81dc8006ef (patch) | |
tree | 1eda064d419d5b9ef6d99819f7d272a073aa068f /example | |
parent | 45c5db5475d2aa0a73675f3a5129523f82adfc18 (diff) | |
download | android_external_fuse-a148242fb80fa2127fdaf41de63e2d81dc8006ef.tar.gz android_external_fuse-a148242fb80fa2127fdaf41de63e2d81dc8006ef.tar.bz2 android_external_fuse-a148242fb80fa2127fdaf41de63e2d81dc8006ef.zip |
cleanup
Diffstat (limited to 'example')
-rw-r--r-- | example/hello_ll.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/example/hello_ll.c b/example/hello_ll.c index 3a6ea09..f5a2baf 100644 --- a/example/hello_ll.c +++ b/example/hello_ll.c @@ -134,7 +134,7 @@ static void hello_ll_read(fuse_req_t req, fuse_ino_t ino, size_t size, reply_buf_limited(req, hello_str, strlen(hello_str), off, size); } -static struct fuse_ll_operations hello_ll_oper = { +static struct fuse_lowlevel_ops hello_ll_oper = { .lookup = hello_ll_lookup, .getattr = hello_ll_getattr, .readdir = hello_ll_readdir, @@ -145,7 +145,6 @@ static struct fuse_ll_operations hello_ll_oper = { int main(int argc, char *argv[]) { const char *mountpoint; - struct fuse_ll *f; int err = -1; int fd; @@ -156,10 +155,17 @@ int main(int argc, char *argv[]) mountpoint = argv[1]; fd = fuse_mount(mountpoint, NULL); if (fd != -1) { - f = fuse_ll_new(fd, "debug", &hello_ll_oper, sizeof(hello_ll_oper), NULL); - if (f != NULL) { - err = fuse_ll_loop(f); - fuse_ll_destroy(f); + struct fuse_session *se; + + se = fuse_lowlevel_new("debug", &hello_ll_oper, sizeof(hello_ll_oper), + NULL); + if (se != NULL) { + 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_destroy(se); } close(fd); } |