aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rwxr-xr-xexample/fioc.c2
-rwxr-xr-xexample/fioc.h2
-rwxr-xr-xexample/hello.c2
-rwxr-xr-xexample/hello_ll.c15
-rwxr-xr-xexample/null.c2
5 files changed, 11 insertions, 12 deletions
diff --git a/example/fioc.c b/example/fioc.c
index cfb18ae..c79c734 100755
--- a/example/fioc.c
+++ b/example/fioc.c
@@ -18,7 +18,7 @@
* gcc -Wall fioc.c `pkg-config fuse --cflags --libs` -o fioc
*
* \section section_source the complete source
- * \include fioc.c
+ * \include fioc.c
*/
diff --git a/example/fioc.h b/example/fioc.h
index c9bf358..42799aa 100755
--- a/example/fioc.h
+++ b/example/fioc.h
@@ -11,7 +11,7 @@
* @tableofcontents
*
* fioc.h - FUSE-ioctl: ioctl support for FUSE
- *
+ *
* \include fioc.h
*/
diff --git a/example/hello.c b/example/hello.c
index 580bff2..f678931 100755
--- a/example/hello.c
+++ b/example/hello.c
@@ -108,7 +108,6 @@ static int hello_read(const char *path, char *buf, size_t size, off_t offset,
return size;
}
-// fuse_operations hello_oper is redirecting function-calls to _our_ functions implemented above
static struct fuse_operations hello_oper = {
.getattr = hello_getattr,
.readdir = hello_readdir,
@@ -116,7 +115,6 @@ static struct fuse_operations hello_oper = {
.read = hello_read,
};
-// in the main function we call the blocking fuse_main(..) function with &hello_oper
int main(int argc, char *argv[])
{
return fuse_main(argc, argv, &hello_oper, NULL);
diff --git a/example/hello_ll.c b/example/hello_ll.c
index 06c881b..151fe8b 100755
--- a/example/hello_ll.c
+++ b/example/hello_ll.c
@@ -9,9 +9,9 @@
/** @file
*
* hello_ll.c - fuse low level functionality
- *
+ *
* unlike hello.c this example will stay in the foreground. it also replaced
- * the convenience function fuse_main(..) with a more low level approach.
+ * the convenience function fuse_main(..) with a more low level approach.
*
* \section section_compile compiling this example
*
@@ -20,7 +20,7 @@
* \section section_usage usage
\verbatim
% mkdir mnt
- % ./hello_ll mnt # program will wait in foreground until you press CTRL+C
+ % ./hello_ll mnt # program will wait in foreground until you press CTRL+C
in a different shell do:
% ls -la mnt
total 4
@@ -191,15 +191,16 @@ int main(int argc, char *argv[])
if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -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) {
fuse_session_add_chan(se, ch);
-
- /* fuse_session_loop(..) blocks until ctrl+c or fusermount -u */
- err = fuse_session_loop(se);
-
+
+ /* Block until ctrl+c or fusermount -u */
+ err = fuse_session_loop(se);
+
fuse_remove_signal_handlers(se);
fuse_session_remove_chan(ch);
}
diff --git a/example/null.c b/example/null.c
index 6952333..3e57dbe 100755
--- a/example/null.c
+++ b/example/null.c
@@ -8,7 +8,7 @@
/** @file
*
- * null.c - FUSE: Filesystem in Userspace
+ * null.c - FUSE: Filesystem in Userspace
*
* \section section_compile compiling this example
*