Skip to content

Commit

Permalink
- added a doxygen main page
Browse files Browse the repository at this point in the history
- modified all examples to be included in doxygen
- modified the API documentation to have more details
- added the 490px_FUSE_structure.svg.png (c) wikipedia
  • Loading branch information
qknight committed Jun 20, 2013
1 parent 18c59ab commit ea7227d
Show file tree
Hide file tree
Showing 20 changed files with 327 additions and 24 deletions.
8 changes: 4 additions & 4 deletions doc/Doxyfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = include
INPUT = . ../include ../example ../lib

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand All @@ -561,7 +561,7 @@ INPUT_ENCODING = UTF-8
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90

FILE_PATTERNS = *.h
FILE_PATTERNS = *.h *.c *.h *.dox

# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
Expand Down Expand Up @@ -601,7 +601,7 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see
# the \include command).

EXAMPLE_PATH =
EXAMPLE_PATH = . ../example/ ../lib

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Expand All @@ -621,7 +621,7 @@ EXAMPLE_RECURSIVE = NO
# directories that contain image that are included in the documentation (see
# the \image command).

IMAGE_PATH =
IMAGE_PATH = images/

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down
Empty file modified doc/how-fuse-works
100644 → 100755
Empty file.
Binary file added doc/images/490px-FUSE_structure.svg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions doc/mainpage.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*!
\mainpage FUSE API documentation

Filesystem in Userspace (FUSE) is a loadable kernel module for Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a "bridge" to the actual kernel interfaces.

(c) Wikipedia

@tableofcontents





\section section1 How FUSE works

@image html 490px-FUSE_structure.svg.png "Structural diagramm of Filesystem in Userspace from http://en.wikipedia.org/wiki/File:FUSE_structure.svg"

\include how-fuse-works




\section section2 Kernel

\include kernel.txt





\section section_examples examples

have a look at the examples listed in the example directory, which can be found here: <a href="files.html">files.html</a>.

- @ref hello.c - minimal FUSE example featuring fuse_main usage

- @ref hello_ll.c - FUSE: Filesystem in Userspace

- @ref null.c - FUSE: Filesystem in Userspace

- @ref cusexmp.c - CUSE example: Character device in Userspace

- @ref fioc.c - FUSE fioc: FUSE ioctl example

- @ref fioclient.c - FUSE fioclient: FUSE ioctl example client

- @ref fsel.c - FUSE fsel: FUSE select example

- @ref fselclient.c - FUSE fselclient: FUSE select example client

- @ref fusexmp.c - FUSE: Filesystem in Userspace

- @ref fusexmp_fh.c - FUSE: Filesystem in Userspace


\section section_links links

<a href="http://sourceforge.net/apps/mediawiki/fuse/index.php?title=Main_Page">http://sourceforge.net/apps/mediawiki/fuse/index.php?title=Main_Page</a> - the fuse wiki

<a href="http://en.wikipedia.org/wiki/Filesystem_in_Userspace">http://en.wikipedia.org/wiki/Filesystem_in_Userspace</a> - FUSE on wikipedia


\section section_todo todo

general:

- fuse_lowlevel.h, describe:
- a channel (or communication channel) is created by fuse_mount(..)
- a fuse session is associated with a channel and a signal handler and runs until the assigned signal handler
shuts the session down, see fuse_session_loop(se) and hello_ll.c

- http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/

- http://cinwell.wordpress.com/

- http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FuseProtocolSketch

- http://muratbuffalo.blogspot.de/2011/05/refuse-to-crash-with-re-fuse.html

examples:
- demonstrate the effect of single vs multithreaded -> fuse_loop fuse_loop_mt

- add comments and source form all existing examples

- also add examples form here: http://sourceforge.net/apps/mediawiki/fuse/index.php?title=Main_Page#How_should_threads_be_startedx3f

- add this new example: http://fuse.996288.n3.nabble.com/Create-multiple-filesystems-in-same-process-td9292.html

\section section_thanks thanks
- Mark Glines, <[email protected]> for his coments on fuse_loop() and fuse_loop_mt().
- Wikipedia - copied the FUSE introduction from the Filesystem in userspace article.
*/
15 changes: 14 additions & 1 deletion example/cusexmp.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall cusexmp.c `pkg-config fuse --cflags --libs` -o cusexmp
*/

/** @file
* @tableofcontents
*
* cusexmp.c - CUSE example: Character device in Userspace
*
* \section section_compile compiling this example
*
* gcc -Wall cusexmp.c `pkg-config fuse --cflags --libs` -o cusexmp
*
* \section section_source the complete source
* \include cusexmp.c
*/


#define FUSE_USE_VERSION 30

#include <cuse_lowlevel.h>
Expand Down
15 changes: 14 additions & 1 deletion example/fioc.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fioc.c `pkg-config fuse --cflags --libs` -o fioc
*/

/** @file
* @tableofcontents
*
* fioc.c - FUSE fioc: FUSE ioctl example
*
* \section section_compile compiling this example
*
* gcc -Wall fioc.c `pkg-config fuse --cflags --libs` -o fioc
*
* \section section_source the complete source
* \include fioc.c
*/


#define FUSE_USE_VERSION 30

#include <fuse.h>
Expand Down
9 changes: 9 additions & 0 deletions example/fioc.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
See the file COPYING.
*/

/** @file
* @tableofcontents
*
* fioc.h - FUSE-ioctl: ioctl support for FUSE
*
* \include fioc.h
*/


#include <sys/types.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
Expand Down
17 changes: 15 additions & 2 deletions example/fioclient.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fioclient.c -o fioclient
*/

/** @file
* @tableofcontents
*
* fioclient.c - FUSE fioclient: FUSE ioctl example client
*
* \section section_compile compiling this example
*
* gcc -Wall fioclient.c -o fioclient
*
* \section section_source the complete source
* fioclient.c
* \include fioclient.c
*/


#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
Expand Down
15 changes: 14 additions & 1 deletion example/fsel.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fsel.c `pkg-config fuse --cflags --libs` -o fsel
*/

/** @file
* @tableofcontents
*
* fsel.c - FUSE fsel: FUSE select example
*
* \section section_compile compiling this example
*
* gcc -Wall fsel.c `pkg-config fuse --cflags --libs` -o fsel
*
* \section section_source the complete source
* \include fsel.c
*/


#define FUSE_USE_VERSION 30

#include <fuse.h>
Expand Down
15 changes: 14 additions & 1 deletion example/fselclient.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fselclient.c -o fselclient
*/

/** @file
* @tableofcontents
*
* fselclient.c - FUSE fselclient: FUSE select example client
*
* \section section_compile compiling this example
*
* gcc -Wall fselclient.c -o fselclient
*
* \section section_source the complete source
* \include fselclient.c
*/


#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
Expand Down
16 changes: 14 additions & 2 deletions example/fusexmp.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,22 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fusexmp.c `pkg-config fuse --cflags --libs` -o fusexmp
*/

/** @file
* @tableofcontents
*
* fusexmp.c - FUSE: Filesystem in Userspace
*
* \section section_compile compiling this example
*
* gcc -Wall fusexmp.c `pkg-config fuse --cflags --libs` -o fusexmp
*
* \section section_source the complete source
* \include fusexmp.c
*/


#define FUSE_USE_VERSION 30

#ifdef HAVE_CONFIG_H
Expand Down
15 changes: 13 additions & 2 deletions example/fusexmp_fh.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall fusexmp_fh.c `pkg-config fuse --cflags --libs` -lulockmgr -o fusexmp_fh
*/

/** @file
* @tableofcontents
*
* fusexmp_fh.c - FUSE: Filesystem in Userspace
*
* \section section_compile compiling this example
*
* gcc -Wall fusexmp_fh.c `pkg-config fuse --cflags --libs` -lulockmgr -o fusexmp_fh
*
* \section section_source the complete source
* \include fusexmp_fh.c
*/

#define FUSE_USE_VERSION 30

#ifdef HAVE_CONFIG_H
Expand Down
31 changes: 29 additions & 2 deletions example/hello.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall hello.c `pkg-config fuse --cflags --libs` -o hello
*/

/** @file
*
* hello.c - minimal FUSE example featuring fuse_main usage
*
* \section section_compile compiling this example
*
* gcc -Wall hello.c `pkg-config fuse --cflags --libs` -o hello
*
* \section section_usage usage
\verbatim
% mkdir mnt
% ./hello mnt # program will vanish into the background
% ls -la mnt
total 4
drwxr-xr-x 2 root root 0 Jan 1 1970 ./
drwxrwx--- 1 root vboxsf 4096 Jun 16 23:12 ../
-r--r--r-- 1 root root 13 Jan 1 1970 hello
% cat mnt/hello
Hello World!
% fusermount -u mnt
\endverbatim
*
* \section section_source the complete source
* \include hello.c
*/


#define FUSE_USE_VERSION 30

#include <fuse.h>
Expand Down Expand Up @@ -83,13 +108,15 @@ 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,
.open = hello_open,
.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);
Expand Down
Loading

0 comments on commit ea7227d

Please sign in to comment.