From 95c0cc741d921069d2710cddab4f3e36b409943d Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sun, 17 Feb 2019 14:11:39 -0500 Subject: [PATCH] replace libfuse's autoconf with makefile --- Makefile | 44 +- libfuse/Makefile | 75 + libfuse/Makefile.am | 15 - libfuse/config.rpath | 684 ----- libfuse/configure.ac | 127 - libfuse/doc/Doxyfile | 1427 ---------- libfuse/doc/Makefile.am | 5 - libfuse/doc/fusermount.1 | 39 - libfuse/doc/how-fuse-works | 54 - libfuse/doc/html/annotated.html | 74 - libfuse/doc/html/bc_s.png | Bin 676 -> 0 bytes libfuse/doc/html/bdwn.png | Bin 147 -> 0 bytes libfuse/doc/html/classes.html | 66 - libfuse/doc/html/closed.png | Bin 132 -> 0 bytes .../dir_3ccffc210a036acba650f09ebe71329d.html | 60 - .../dir_d44c64559bbebec7f509842c48db8b23.html | 85 - libfuse/doc/html/doxygen.css | 1440 ----------- libfuse/doc/html/doxygen.png | Bin 3779 -> 0 bytes libfuse/doc/html/dynsections.js | 97 - libfuse/doc/html/files.html | 65 - libfuse/doc/html/ftv2blank.png | Bin 86 -> 0 bytes libfuse/doc/html/ftv2doc.png | Bin 746 -> 0 bytes libfuse/doc/html/ftv2folderclosed.png | Bin 616 -> 0 bytes libfuse/doc/html/ftv2folderopen.png | Bin 597 -> 0 bytes libfuse/doc/html/ftv2lastnode.png | Bin 86 -> 0 bytes libfuse/doc/html/ftv2link.png | Bin 746 -> 0 bytes libfuse/doc/html/ftv2mlastnode.png | Bin 246 -> 0 bytes libfuse/doc/html/ftv2mnode.png | Bin 246 -> 0 bytes libfuse/doc/html/ftv2node.png | Bin 86 -> 0 bytes libfuse/doc/html/ftv2plastnode.png | Bin 229 -> 0 bytes libfuse/doc/html/ftv2pnode.png | Bin 229 -> 0 bytes libfuse/doc/html/ftv2splitbar.png | Bin 314 -> 0 bytes libfuse/doc/html/ftv2vertline.png | Bin 86 -> 0 bytes libfuse/doc/html/functions.html | 519 ---- libfuse/doc/html/functions_vars.html | 519 ---- libfuse/doc/html/fuse_8h.html | 968 ------- libfuse/doc/html/fuse__common_8h.html | 548 ---- libfuse/doc/html/fuse__lowlevel_8h.html | 2291 ----------------- libfuse/doc/html/fuse__opt_8h.html | 530 ---- libfuse/doc/html/globals.html | 440 ---- libfuse/doc/html/globals_defs.html | 106 - libfuse/doc/html/globals_enum.html | 70 - libfuse/doc/html/globals_eval.html | 85 - libfuse/doc/html/globals_func.html | 353 --- libfuse/doc/html/globals_type.html | 82 - libfuse/doc/html/index.html | 50 - libfuse/doc/html/nav_f.png | Bin 153 -> 0 bytes libfuse/doc/html/nav_g.png | Bin 95 -> 0 bytes libfuse/doc/html/nav_h.png | Bin 98 -> 0 bytes libfuse/doc/html/open.png | Bin 123 -> 0 bytes libfuse/doc/html/structfuse__args.html | 115 - libfuse/doc/html/structfuse__buf.html | 149 -- libfuse/doc/html/structfuse__bufvec.html | 132 - libfuse/doc/html/structfuse__chan__ops.html | 141 - libfuse/doc/html/structfuse__conn__info.html | 221 -- libfuse/doc/html/structfuse__context.html | 161 -- libfuse/doc/html/structfuse__ctx.html | 130 - .../doc/html/structfuse__entry__param.html | 149 -- libfuse/doc/html/structfuse__file__info.html | 221 -- .../doc/html/structfuse__lowlevel__ops.html | 1158 --------- libfuse/doc/html/structfuse__module.html | 112 - libfuse/doc/html/structfuse__operations.html | 867 ------- libfuse/doc/html/structfuse__opt.html | 136 - .../doc/html/structfuse__session__ops.html | 160 -- libfuse/doc/html/sync_off.png | Bin 853 -> 0 bytes libfuse/doc/html/sync_on.png | Bin 845 -> 0 bytes libfuse/doc/html/tab_a.png | Bin 142 -> 0 bytes libfuse/doc/html/tab_b.png | Bin 169 -> 0 bytes libfuse/doc/html/tab_h.png | Bin 177 -> 0 bytes libfuse/doc/html/tab_s.png | Bin 184 -> 0 bytes libfuse/doc/html/tabs.css | 60 - libfuse/doc/kernel.txt | 423 --- libfuse/doc/mount.fuse.8 | 161 -- libfuse/doc/ulockmgr_server.1 | 28 - libfuse/ecfd/LICENSE | 17 + libfuse/ecfd/README.md | 16 + libfuse/ecfd/build | 32 + libfuse/ecfd/tests/HAVE_FORK.c | 10 + libfuse/ecfd/tests/HAVE_SPLICE.c | 11 + libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c | 14 + libfuse/ecfd/tests/HAVE_UTIMENSAT.c | 11 + libfuse/ecfd/tests/HAVE_VMSPLICE.c | 12 + libfuse/ecfd/tests/static_assert.h | 4 + libfuse/example/Makefile.am | 17 - libfuse/example/cusexmp.c | 294 --- libfuse/example/fioc.c | 211 -- libfuse/example/fioc.h | 32 - libfuse/example/fioclient.c | 122 - libfuse/example/fsel.c | 278 -- libfuse/example/fselclient.c | 72 - libfuse/example/fusexmp.c | 412 --- libfuse/example/fusexmp_fh.c | 567 ---- libfuse/example/hello.c | 96 - libfuse/example/hello_ll.c | 181 -- libfuse/example/null.c | 95 - libfuse/lib/mount.c | 656 +---- libfuse/lib/mount_generic.c | 644 +++++ src/fuse_ioctl.cpp | 18 +- 98 files changed, 877 insertions(+), 18387 deletions(-) create mode 100644 libfuse/Makefile delete mode 100644 libfuse/Makefile.am delete mode 100755 libfuse/config.rpath delete mode 100644 libfuse/configure.ac delete mode 100644 libfuse/doc/Doxyfile delete mode 100644 libfuse/doc/Makefile.am delete mode 100644 libfuse/doc/fusermount.1 delete mode 100644 libfuse/doc/how-fuse-works delete mode 100644 libfuse/doc/html/annotated.html delete mode 100644 libfuse/doc/html/bc_s.png delete mode 100644 libfuse/doc/html/bdwn.png delete mode 100644 libfuse/doc/html/classes.html delete mode 100644 libfuse/doc/html/closed.png delete mode 100644 libfuse/doc/html/dir_3ccffc210a036acba650f09ebe71329d.html delete mode 100644 libfuse/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html delete mode 100644 libfuse/doc/html/doxygen.css delete mode 100644 libfuse/doc/html/doxygen.png delete mode 100644 libfuse/doc/html/dynsections.js delete mode 100644 libfuse/doc/html/files.html delete mode 100644 libfuse/doc/html/ftv2blank.png delete mode 100644 libfuse/doc/html/ftv2doc.png delete mode 100644 libfuse/doc/html/ftv2folderclosed.png delete mode 100644 libfuse/doc/html/ftv2folderopen.png delete mode 100644 libfuse/doc/html/ftv2lastnode.png delete mode 100644 libfuse/doc/html/ftv2link.png delete mode 100644 libfuse/doc/html/ftv2mlastnode.png delete mode 100644 libfuse/doc/html/ftv2mnode.png delete mode 100644 libfuse/doc/html/ftv2node.png delete mode 100644 libfuse/doc/html/ftv2plastnode.png delete mode 100644 libfuse/doc/html/ftv2pnode.png delete mode 100644 libfuse/doc/html/ftv2splitbar.png delete mode 100644 libfuse/doc/html/ftv2vertline.png delete mode 100644 libfuse/doc/html/functions.html delete mode 100644 libfuse/doc/html/functions_vars.html delete mode 100644 libfuse/doc/html/fuse_8h.html delete mode 100644 libfuse/doc/html/fuse__common_8h.html delete mode 100644 libfuse/doc/html/fuse__lowlevel_8h.html delete mode 100644 libfuse/doc/html/fuse__opt_8h.html delete mode 100644 libfuse/doc/html/globals.html delete mode 100644 libfuse/doc/html/globals_defs.html delete mode 100644 libfuse/doc/html/globals_enum.html delete mode 100644 libfuse/doc/html/globals_eval.html delete mode 100644 libfuse/doc/html/globals_func.html delete mode 100644 libfuse/doc/html/globals_type.html delete mode 100644 libfuse/doc/html/index.html delete mode 100644 libfuse/doc/html/nav_f.png delete mode 100644 libfuse/doc/html/nav_g.png delete mode 100644 libfuse/doc/html/nav_h.png delete mode 100644 libfuse/doc/html/open.png delete mode 100644 libfuse/doc/html/structfuse__args.html delete mode 100644 libfuse/doc/html/structfuse__buf.html delete mode 100644 libfuse/doc/html/structfuse__bufvec.html delete mode 100644 libfuse/doc/html/structfuse__chan__ops.html delete mode 100644 libfuse/doc/html/structfuse__conn__info.html delete mode 100644 libfuse/doc/html/structfuse__context.html delete mode 100644 libfuse/doc/html/structfuse__ctx.html delete mode 100644 libfuse/doc/html/structfuse__entry__param.html delete mode 100644 libfuse/doc/html/structfuse__file__info.html delete mode 100644 libfuse/doc/html/structfuse__lowlevel__ops.html delete mode 100644 libfuse/doc/html/structfuse__module.html delete mode 100644 libfuse/doc/html/structfuse__operations.html delete mode 100644 libfuse/doc/html/structfuse__opt.html delete mode 100644 libfuse/doc/html/structfuse__session__ops.html delete mode 100644 libfuse/doc/html/sync_off.png delete mode 100644 libfuse/doc/html/sync_on.png delete mode 100644 libfuse/doc/html/tab_a.png delete mode 100644 libfuse/doc/html/tab_b.png delete mode 100644 libfuse/doc/html/tab_h.png delete mode 100644 libfuse/doc/html/tab_s.png delete mode 100644 libfuse/doc/html/tabs.css delete mode 100644 libfuse/doc/kernel.txt delete mode 100644 libfuse/doc/mount.fuse.8 delete mode 100644 libfuse/doc/ulockmgr_server.1 create mode 100644 libfuse/ecfd/LICENSE create mode 100644 libfuse/ecfd/README.md create mode 100755 libfuse/ecfd/build create mode 100644 libfuse/ecfd/tests/HAVE_FORK.c create mode 100644 libfuse/ecfd/tests/HAVE_SPLICE.c create mode 100644 libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c create mode 100644 libfuse/ecfd/tests/HAVE_UTIMENSAT.c create mode 100644 libfuse/ecfd/tests/HAVE_VMSPLICE.c create mode 100644 libfuse/ecfd/tests/static_assert.h delete mode 100644 libfuse/example/Makefile.am delete mode 100644 libfuse/example/cusexmp.c delete mode 100644 libfuse/example/fioc.c delete mode 100644 libfuse/example/fioc.h delete mode 100644 libfuse/example/fioclient.c delete mode 100644 libfuse/example/fsel.c delete mode 100644 libfuse/example/fselclient.c delete mode 100644 libfuse/example/fusexmp.c delete mode 100644 libfuse/example/fusexmp_fh.c delete mode 100644 libfuse/example/hello.c delete mode 100644 libfuse/example/hello_ll.c delete mode 100644 libfuse/example/null.c create mode 100644 libfuse/lib/mount_generic.c diff --git a/Makefile b/Makefile index 0b3837c5..5a1b8e1a 100644 --- a/Makefile +++ b/Makefile @@ -38,21 +38,9 @@ endif USE_XATTR = 1 -INTERNAL_FUSE = 1 -EXTERNAL_FUSE_MIN_REQ = 2.9.7 - -ifeq ($(INTERNAL_FUSE),1) FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64 -Ilibfuse/include -FUSE_LIBS = libfuse/lib/.libs/libfuse.a +FUSE_LIBS = libfuse/obj/libfuse.a FUSE_TARGET = $(FUSE_LIBS) -else -FUSE_CFLAGS := $(shell $(PKGCONFIG) --cflags 'fuse >= $(EXTERNAL_FUSE_MIN_REQ)') -FUSE_LIBS := $(shell $(PKGCONFIG) --libs 'fuse >= $(EXTERNAL_FUSE_MIN_REQ)') -FUSE_TARGET := -ifeq ($(FUSE_CFLAGS)$(FUSE_LIBS),) -$(error "Use of external FUSE requested, but no libfuse >= $(EXTERNAL_FUSE_MIN_REQ) found.") -endif -endif ifeq ($(STATIC),1) STATIC_FLAG := -static @@ -103,7 +91,6 @@ all: $(TARGET) help: @echo "usage: make\n" @echo "make USE_XATTR=0 - build program without xattrs functionality" - @echo "make INTERNAL_FUSE=0 - to build program with external (system) libfuse rather than the bundled one ('-o threads=' option will be unavailable)" @echo "make STATIC=1 - build static binary" @echo "make LTO=1 - build with link time optimization" @@ -137,24 +124,14 @@ obj/obj-stamp: obj/%.o: src/%.cpp $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@ -clean: rpm-clean libfuse_Makefile +clean: rpm-clean $(RM) -f src/version.hpp $(RM) -rf obj $(RM) -f "$(TARGET)" mount.mergerfs $(FIND) . -name "*~" -delete -ifeq ($(INTERNAL_FUSE),1) cd libfuse && $(MAKE) clean -endif - -distclean: clean libfuse_Makefile -ifeq ($(INTERNAL_FUSE),1) - cd libfuse && $(MAKE) distclean -endif -ifeq ($(GIT_REPO),1) - $(GIT) clean -fd -endif -superclean: distclean +distclean: clean ifeq ($(GIT_REPO),1) $(GIT) clean -xfd endif @@ -236,19 +213,8 @@ install-build-pkgs: tools/install-build-pkgs unexport CFLAGS -.PHONY: libfuse_Makefile -libfuse_Makefile: -ifeq ($(INTERNAL_FUSE),1) -ifeq ($(shell test -e libfuse/Makefile; echo $$?),1) - cd libfuse && \ - $(MKDIR) -p m4 && \ - autoreconf --force --install && \ - ./configure --enable-lib --disable-util --disable-example -endif -endif - -libfuse/lib/.libs/libfuse.a: libfuse_Makefile - cd libfuse && $(MAKE) +libfuse/obj/libfuse.a: + cd libfuse && $(MAKE) libfuse.a .PHONY: all clean install help version diff --git a/libfuse/Makefile b/libfuse/Makefile new file mode 100644 index 00000000..cceb7868 --- /dev/null +++ b/libfuse/Makefile @@ -0,0 +1,75 @@ +VERSION = "2.9.7-mergerfs_2.26.0" +OPT = -O2 + +DESTDIR = "/" +BINDIR = "/bin" +SBINDIR = "/sbin" +SRC = \ + lib/buffer.c \ + lib/cuse_lowlevel.c \ + lib/fuse.c \ + lib/fuse_kern_chan.c \ + lib/fuse_loop.c \ + lib/fuse_loop_mt.c \ + lib/fuse_lowlevel.c \ + lib/fuse_mt.c \ + lib/fuse_opt.c \ + lib/fuse_session.c \ + lib/fuse_signals.c \ + lib/helper.c \ + lib/mount.c + +OBJ = $(SRC:lib/%.c=obj/%.o) +DEPS = $(OBJ:obj/%.o=obj/%.d) +CFLAGS = $(OPT) \ + -g \ + -Wall \ + -pipe \ + '-D_FILE_OFFSET_BITS=64' \ + '-D_REENTRANT' \ + '-DFUSE_USE_VERSION=29' \ + '-DFUSERMOUNT_DIR="/usr/local/bin"' \ + '-DPACKAGE_VERSION=$(VERSION)' \ + -Iinclude \ + -MMD +LDFLAGS = \ + -ldl \ + -lrt \ + -pthread + +all: obj/libfuse.a mergerfs-mount mount.mergerfs + +libfuse.a: obj/libfuse.a + +include/config.h: + ecfd/build | tee include/config.h + +obj/libfuse.a: obj/obj-stamp include/config.h $(OBJ) + ar rcs obj/libfuse.a $(OBJ) + +mergerfs-mount: include/config.h util/fusermount.c lib/mount_util.c + $(CC) $(CFLAGS) -Ilib -o mergerfs-mount util/fusermount.c lib/mount_util.c + +mount.mergerfs: obj/libfuse.a util/mount.fuse.c + $(CC) $(CFLAGS) -o mount.mergerfs util/mount.fuse.c obj/libfuse.a $(LDFLAGS) + +obj/obj-stamp: + mkdir -p obj + touch $@ + +obj/%.o: lib/%.c + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + rm -rf obj include/config.h mergerfs-mount mount.mergerfs + +distclean: clean + git clean -fdx + +install: + install -D mergerfs-mount "$(DESTDIR)$(BINDIR)/mergerfs-mount" + chown root:root "$(DESTDIR)$(BINDIR)/mergerfs-mount" + chmod u+s "$(DESTDIR)$(BINDIR)/mergerfs-mount" + install -D mount.mergerfs "$(DESTDIR)$(SBINDIR)/mount.mergerfs" + +-include $(DEPS) diff --git a/libfuse/Makefile.am b/libfuse/Makefile.am deleted file mode 100644 index 691b1bcb..00000000 --- a/libfuse/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -## Process this file with automake to produce Makefile.in - -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = @subdirs2@ doc -AUTOMAKE_OPTIONS = subdir-objects - -EXTRA_DIST = \ - fuse.pc.in \ - README* - -pkgconfigdir = @pkgconfigdir@ -pkgconfig_DATA = fuse.pc - -$(pkgconfig_DATA): config.status diff --git a/libfuse/config.rpath b/libfuse/config.rpath deleted file mode 100755 index b625621f..00000000 --- a/libfuse/config.rpath +++ /dev/null @@ -1,684 +0,0 @@ -#! /bin/sh -# Output a system dependent set of variables, describing how to set the -# run time search path of shared libraries in an executable. -# -# Copyright 1996-2014 Free Software Foundation, Inc. -# Taken from GNU libtool, 2001 -# Originally by Gordon Matzigkeit , 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld -# should be set by the caller. -# -# The set of defined variables is at the end of this script. - -# Known limitations: -# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer -# than 256 bytes, otherwise the compiler driver will dump core. The only -# known workaround is to choose shorter directory names for the build -# directory and/or the installation directory. - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -shrext=.so - -host="$1" -host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -# Code taken from libtool.m4's _LT_CC_BASENAME. - -for cc_temp in $CC""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` - -# Code taken from libtool.m4's _LT_COMPILER_PIC. - -wl= -if test "$GCC" = yes; then - wl='-Wl,' -else - case "$host_os" in - aix*) - wl='-Wl,' - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' - ;; - irix5* | irix6* | nonstopux*) - wl='-Wl,' - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - ecc*) - wl='-Wl,' - ;; - icc* | ifort*) - wl='-Wl,' - ;; - lf95*) - wl='-Wl,' - ;; - nagfor*) - wl='-Wl,-Wl,,' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - wl='-Wl,' - ;; - ccc*) - wl='-Wl,' - ;; - xl* | bgxl* | bgf* | mpixl*) - wl='-Wl,' - ;; - como) - wl='-lopt=' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - wl= - ;; - *Sun\ C*) - wl='-Wl,' - ;; - esac - ;; - esac - ;; - newsos6) - ;; - *nto* | *qnx*) - ;; - osf3* | osf4* | osf5*) - wl='-Wl,' - ;; - rdos*) - ;; - solaris*) - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - wl='-Qoption ld ' - ;; - *) - wl='-Wl,' - ;; - esac - ;; - sunos4*) - wl='-Qoption ld ' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - wl='-Wl,' - ;; - sysv4*MP*) - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - wl='-Wl,' - ;; - unicos*) - wl='-Wl,' - ;; - uts4*) - ;; - esac -fi - -# Code taken from libtool.m4's _LT_LINKER_SHLIBS. - -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no - -case "$host_os" in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - case "$host_os" in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - fi - ;; - amigaos*) - case "$host_cpu" in - powerpc) - ;; - m68k) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - haiku*) - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - netbsd*) - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - hardcode_direct=yes - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - esac - if test "$ld_shlibs" = no; then - hardcode_libdir_flag_spec= - fi -else - case "$host_os" in - aix3*) - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - fi - hardcode_direct=yes - hardcode_libdir_separator=':' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - fi - # Begin _LT_AC_SYS_LIBPATH_AIX. - echo 'int main () { return 0; }' > conftest.c - ${CC} ${LDFLAGS} conftest.c -o conftest - aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - fi - if test -z "$aix_libpath"; then - aix_libpath="/usr/lib:/lib" - fi - rm -f conftest.c conftest - # End _LT_AC_SYS_LIBPATH_AIX. - if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - else - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - fi - fi - ;; - amigaos*) - case "$host_cpu" in - powerpc) - ;; - m68k) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - bsdi[45]*) - ;; - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - libext=lib - ;; - darwin* | rhapsody*) - hardcode_direct=no - if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then - : - else - ld_shlibs=no - fi - ;; - dgux*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - freebsd2.[01]*) - hardcode_direct=yes - hardcode_minus_L=yes - ;; - freebsd* | dragonfly*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - hpux9*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - hpux10*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - ;; - *) - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - netbsd*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - newsos6) - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - *nto* | *qnx*) - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - else - case "$host_os" in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - osf3*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) - if test "$GCC" = yes; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - # Both cc and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - solaris*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - sunos4*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - sysv4) - case $host_vendor in - sni) - hardcode_direct=yes # is this really true??? - ;; - siemens) - hardcode_direct=no - ;; - motorola) - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - ;; - sysv4.3*) - ;; - sysv4*MP*) - if test -d /usr/nec; then - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - ;; - sysv5* | sco3.2v5* | sco5v6*) - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - ;; - uts4*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - *) - ld_shlibs=no - ;; - esac -fi - -# Check dynamic linker characteristics -# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. -# Unlike libtool.m4, here we don't care about _all_ names of the library, but -# only about the one the linker finds when passed -lNAME. This is the last -# element of library_names_spec in libtool.m4, or possibly two of them if the -# linker has special search rules. -library_names_spec= # the last element of library_names_spec in libtool.m4 -libname_spec='lib$name' -case "$host_os" in - aix3*) - library_names_spec='$libname.a' - ;; - aix[4-9]*) - library_names_spec='$libname$shrext' - ;; - amigaos*) - case "$host_cpu" in - powerpc*) - library_names_spec='$libname$shrext' ;; - m68k) - library_names_spec='$libname.a' ;; - esac - ;; - beos*) - library_names_spec='$libname$shrext' - ;; - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; - cygwin* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; - darwin* | rhapsody*) - shrext=.dylib - library_names_spec='$libname$shrext' - ;; - dgux*) - library_names_spec='$libname$shrext' - ;; - freebsd[23].*) - library_names_spec='$libname$shrext$versuffix' - ;; - freebsd* | dragonfly*) - library_names_spec='$libname$shrext' - ;; - gnu*) - library_names_spec='$libname$shrext' - ;; - haiku*) - library_names_spec='$libname$shrext' - ;; - hpux9* | hpux10* | hpux11*) - case $host_cpu in - ia64*) - shrext=.so - ;; - hppa*64*) - shrext=.sl - ;; - *) - shrext=.sl - ;; - esac - library_names_spec='$libname$shrext' - ;; - interix[3-9]*) - library_names_spec='$libname$shrext' - ;; - irix5* | irix6* | nonstopux*) - library_names_spec='$libname$shrext' - case "$host_os" in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; - *) libsuff= shlibsuff= ;; - esac - ;; - esac - ;; - linux*oldld* | linux*aout* | linux*coff*) - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - library_names_spec='$libname$shrext' - ;; - knetbsd*-gnu) - library_names_spec='$libname$shrext' - ;; - netbsd*) - library_names_spec='$libname$shrext' - ;; - newsos6) - library_names_spec='$libname$shrext' - ;; - *nto* | *qnx*) - library_names_spec='$libname$shrext' - ;; - openbsd*) - library_names_spec='$libname$shrext$versuffix' - ;; - os2*) - libname_spec='$name' - shrext=.dll - library_names_spec='$libname.a' - ;; - osf3* | osf4* | osf5*) - library_names_spec='$libname$shrext' - ;; - rdos*) - ;; - solaris*) - library_names_spec='$libname$shrext' - ;; - sunos4*) - library_names_spec='$libname$shrext$versuffix' - ;; - sysv4 | sysv4.3*) - library_names_spec='$libname$shrext' - ;; - sysv4*MP*) - library_names_spec='$libname$shrext' - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - library_names_spec='$libname$shrext' - ;; - tpf*) - library_names_spec='$libname$shrext' - ;; - uts4*) - library_names_spec='$libname$shrext' - ;; -esac - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` -shlibext=`echo "$shrext" | sed -e 's,^\.,,'` -escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` - -LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <@], - [pkgconfigdir=$withval], - [pkgconfigdir='${libdir}/pkgconfig']) -AC_SUBST(pkgconfigdir) - -subdirs2="include" - -if test "$enable_lib" != "no"; then - subdirs2="$subdirs2 lib"; -fi -if test "$arch" = linux -a "$enable_util" != "no"; then - subdirs2="$subdirs2 util"; -fi -if test "$enable_example" != "no"; then - subdirs2="$subdirs2 example"; -fi -if test "$enable_mtab" = "no"; then - AC_DEFINE(IGNORE_MTAB, 1, [Don't update /etc/mtab]) -fi - -AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) -AC_CHECK_FUNCS([posix_fallocate]) -AC_CHECK_MEMBERS([struct stat.st_atim]) -AC_CHECK_MEMBERS([struct stat.st_atimespec]) - -LIBS= -AC_SEARCH_LIBS(dlopen, [dl]) -AC_SEARCH_LIBS(clock_gettime, [rt]) -libfuse_libs=$LIBS -LIBS= -AC_ARG_WITH([libiconv-prefix], -[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ - for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi - if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi - done - ]) -AM_ICONV -libfuse_libs="$libfuse_libs $LTLIBICONV" -AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = yes) -AC_SUBST(libfuse_libs) - -if test -z "$MOUNT_FUSE_PATH"; then - MOUNT_FUSE_PATH=/sbin - AC_MSG_NOTICE([MOUNT_FUSE_PATH env var not set, using default $MOUNT_FUSE_PATH]) -fi -AC_SUBST(MOUNT_FUSE_PATH) -if test -z "$UDEV_RULES_PATH"; then - UDEV_RULES_PATH=/etc/udev/rules.d - AC_MSG_NOTICE([UDEV_RULES_PATH env var not set, using default $UDEV_RULES_PATH]) -fi -AC_SUBST(UDEV_RULES_PATH) -if test -z "$INIT_D_PATH"; then - INIT_D_PATH=/etc/init.d - AC_MSG_NOTICE([INIT_D_PATH env var not set, using default $INIT_D_PATH]) -fi -AC_SUBST(INIT_D_PATH) - -AC_SUBST(subdirs2) - -AM_CONDITIONAL(LINUX, test "$arch" = linux) -AM_CONDITIONAL(NETBSD, test "$arch" = netbsd) -AM_CONDITIONAL(BSD, test "$arch" = bsd) - -util_linux_ok=yes -if test "$arch" = linux -a "$cross_compiling" != "yes"; then - AC_MSG_CHECKING([if umount supports --fake --no-canonicalize]) - # exit code of umount is 1 if option is unrecognised, 2 otherwise - umount --fake --no-canonicalize > /dev/null 2>&1 - if test $? != 1; then - AC_MSG_RESULT([yes]) - else - firstline=`umount --fake --no-canonicalize 2>&1 | head -1` - if test "$firstline" = 'umount: only root can use "--fake" option'; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([$firstline]) - util_linux_ok=no - fi - fi -fi - -AC_CONFIG_FILES([fuse.pc Makefile lib/Makefile util/Makefile example/Makefile include/Makefile doc/Makefile]) -AC_OUTPUT - -if test "$util_linux_ok" = no; then - AC_MSG_WARN([ -****************************************************************** -* Please install util-linux version 2.18 or later which supports * -* --fake and --no-canonicalize options in mount and umount * -******************************************************************]) -fi diff --git a/libfuse/doc/Doxyfile b/libfuse/doc/Doxyfile deleted file mode 100644 index 3926aaf3..00000000 --- a/libfuse/doc/Doxyfile +++ /dev/null @@ -1,1427 +0,0 @@ -# Doxyfile 1.5.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = fuse - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = include - -# 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 -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.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 - -# 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. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# 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 -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# 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 -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hiererachy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = NO - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 1000 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/libfuse/doc/Makefile.am b/libfuse/doc/Makefile.am deleted file mode 100644 index 1d38e48f..00000000 --- a/libfuse/doc/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -## Process this file with automake to produce Makefile.in - -dist_man_MANS = fusermount.1 mount.fuse.8 ulockmgr_server.1 - -EXTRA_DIST = how-fuse-works kernel.txt Doxyfile html diff --git a/libfuse/doc/fusermount.1 b/libfuse/doc/fusermount.1 deleted file mode 100644 index 86998e20..00000000 --- a/libfuse/doc/fusermount.1 +++ /dev/null @@ -1,39 +0,0 @@ -.TH FUSERMOUNT 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)" - -.SH NAME -\fBfusermount\fR \- mount and unmount FUSE filesystems - -.SH SYNOPSIS -\fBfusermount\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR - -.SH DESCRIPTION -Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations. -.PP -\fBfusermount\fR is a program to mount and unmount FUSE filesystems. - -.SH OPTIONS -.IP "\-h" 4 -print help. -.IP "\-V" 4 -print version. -.IP "-o \fIOPTION\fR[,\fIOPTION\fR...]" 4 -mount options. -.IP "-u" 4 -unmount. -.IP "-q" 4 -quiet. -.IP "-z" 4 -lazy unmount. - -.SH SEE ALSO -\fImount\fR(8), -\fImount.fuse\fR(8), -\fIulockmgr_server\fR(1). - -.SH HOMEPAGE -More information about fusermount and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>. - -.SH AUTHOR -FUSE was written by Miklos Szeredi <\fImiklos@szeredi.hu\fR>. -.PP -This manual page was written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>. diff --git a/libfuse/doc/how-fuse-works b/libfuse/doc/how-fuse-works deleted file mode 100644 index a5febe39..00000000 --- a/libfuse/doc/how-fuse-works +++ /dev/null @@ -1,54 +0,0 @@ - How Fuse-1.3 Works - -[Written by Terje Oseberg] - -1. The fuse library. - -When your user mode program calls fuse_main() (lib/helper.c), -fuse_main() parses the arguments passed to your user mode program, -then calls fuse_mount() (lib/mount.c). - -fuse_mount() creates a UNIX domain socket pair, then forks and execs -fusermount (util/fusermount.c) passing it one end of the socket in the -FUSE_COMMFD_ENV environment variable. - -fusermount (util/fusermount.c) makes sure that the fuse module is -loaded. fusermount then open /dev/fuse and send the file handle over a -UNIX domain socket back to fuse_mount(). - -fuse_mount() returns the filehandle for /dev/fuse to fuse_main(). - -fuse_main() calls fuse_new() (lib/fuse.c) which allocates the struct -fuse datastructure that stores and maintains a cached image of the -filesystem data. - -Lastly, fuse_main() calls either fuse_loop() (lib/fuse.c) or -fuse_loop_mt() (lib/fuse_mt.c) which both start to read the filesystem -system calls from the /dev/fuse, call the usermode functions -stored in struct fuse_operations datastructure before calling -fuse_main(). The results of those calls are then written back to the -/dev/fuse file where they can be forwarded back to the system -calls. - -2. The kernel module. - -The kernel module consists of two parts. First the proc filesystem -component in kernel/dev.c -and second the filesystem system calls -kernel/file.c, kernel/inode.c, and kernel/dir.c - -All the system calls in kernel/file.c, kernel/inode.c, and -kernel/dir.c make calls to either request_send(), -request_send_noreply(), or request_send_nonblock(). Most of the calls -(all but 2) are to request_send(). request_send() adds the request to, -"list of requests" structure (fc->pending), then waits for a response. -request_send_noreply() and request_send_nonblock() are both similar in -function to request_send() except that one is non-blocking, and the -other does not respond with a reply. - -The proc filesystem component in kernel/dev.c responds to file io -requests to the file /dev/fuse. fuse_dev_read() handles the -file reads and returns commands from the "list of requests" structure -to the calling program. fuse_dev_write() handles file writes and takes -the data written and places them into the req->out datastructure where -they can be returned to the system call through the "list of requests" -structure and request_send(). diff --git a/libfuse/doc/html/annotated.html b/libfuse/doc/html/annotated.html deleted file mode 100644 index 1e76c4e8..00000000 --- a/libfuse/doc/html/annotated.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - -fuse: Data Structures - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
-
-
Data Structures
-
-
-
Here are the data structures with brief descriptions:
-
- - - - diff --git a/libfuse/doc/html/bc_s.png b/libfuse/doc/html/bc_s.png deleted file mode 100644 index 224b29aa9847d5a4b3902efd602b7ddf7d33e6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT diff --git a/libfuse/doc/html/bdwn.png b/libfuse/doc/html/bdwn.png deleted file mode 100644 index 940a0b950443a0bb1b216ac03c45b8a16c955452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T - - - - - -fuse: Data Structure Index - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
-
-
Data Structure Index
-
- - - - - diff --git a/libfuse/doc/html/closed.png b/libfuse/doc/html/closed.png deleted file mode 100644 index 98cc2c909da37a6df914fbf67780eebd99c597f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT diff --git a/libfuse/doc/html/dir_3ccffc210a036acba650f09ebe71329d.html b/libfuse/doc/html/dir_3ccffc210a036acba650f09ebe71329d.html deleted file mode 100644 index 19b8c6d8..00000000 --- a/libfuse/doc/html/dir_3ccffc210a036acba650f09ebe71329d.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - -fuse: include/old Directory Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
-
-
old Directory Reference
-
-
- - - - -

-Files

file  fuse.h
 
-
- - - - diff --git a/libfuse/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html b/libfuse/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html deleted file mode 100644 index 15ab6b0a..00000000 --- a/libfuse/doc/html/dir_d44c64559bbebec7f509842c48db8b23.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - -fuse: include Directory Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
-
-
include Directory Reference
-
-
- - - - -

-Directories

directory  old
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Files

file  config.h
 
file  cuse_lowlevel.h
 
file  fuse.h
 
file  fuse_common.h
 
file  fuse_common_compat.h
 
file  fuse_compat.h
 
file  fuse_kernel.h
 
file  fuse_lowlevel.h
 
file  fuse_lowlevel_compat.h
 
file  fuse_opt.h
 
file  ulockmgr.h
 
-
- - - - diff --git a/libfuse/doc/html/doxygen.css b/libfuse/doc/html/doxygen.css deleted file mode 100644 index 02e8b015..00000000 --- a/libfuse/doc/html/doxygen.css +++ /dev/null @@ -1,1440 +0,0 @@ -/* The standard CSS for doxygen 1.8.8 */ - -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; -} - -/* @group Heading Levels */ - -h1.groupheader { - font-size: 150%; -} - -.title { - font: 400 14px/28px Roboto,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; -} - -div.fragment { - padding: 4px 6px; - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; -} - -div.line { - font-family: monospace, fixed; - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; -} - - -span.lineno { - padding-right: 4px; - text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; -} -span.lineno a { - background-color: #D8D8D8; -} - -span.lineno a:hover { - background-color: #C8C8C8; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px cyan; -} - -.memname { - font-weight: bold; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - border-top-left-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; - text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.even { - padding-left: 6px; - background-color: #F7F8FB; -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; -} - -.arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('ftv2folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('ftv2folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('ftv2doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -table.directory { - font: 400 14px Roboto,sans-serif; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -dl -{ - padding: 0 0 0 10px; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ -dl.section -{ - margin-left: 0px; - padding-left: 0px; -} - -dl.note -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00D000; -} - -dl.deprecated -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #505050; -} - -dl.todo -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00C0E0; -} - -dl.test -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #3030E0; -} - -dl.bug -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 20px 10px 10px; - width: 200px; -} - -div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 30px; -} - -div.toc li.level4 { - margin-left: 45px; -} - -.inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: grey; - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: #006318; -} - -#powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before { - border-top-color: #808080; - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - diff --git a/libfuse/doc/html/doxygen.png b/libfuse/doc/html/doxygen.png deleted file mode 100644 index 3ff17d807fd8aa003bed8bb2a69e8f0909592fd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} diff --git a/libfuse/doc/html/dynsections.js b/libfuse/doc/html/dynsections.js deleted file mode 100644 index 85e18369..00000000 --- a/libfuse/doc/html/dynsections.js +++ /dev/null @@ -1,97 +0,0 @@ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - -fuse: File List - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
[detail level 12]
- - - - - -
  include
 fuse.h
 fuse_common.h
 fuse_lowlevel.h
 fuse_opt.h
-
-
- - - - diff --git a/libfuse/doc/html/ftv2blank.png b/libfuse/doc/html/ftv2blank.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/libfuse/doc/html/ftv2doc.png b/libfuse/doc/html/ftv2doc.png deleted file mode 100644 index 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t diff --git a/libfuse/doc/html/ftv2folderclosed.png b/libfuse/doc/html/ftv2folderclosed.png deleted file mode 100644 index bb8ab35edce8e97554e360005ee9fc5bffb36e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA diff --git a/libfuse/doc/html/ftv2lastnode.png b/libfuse/doc/html/ftv2lastnode.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/libfuse/doc/html/ftv2link.png b/libfuse/doc/html/ftv2link.png deleted file mode 100644 index 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t diff --git a/libfuse/doc/html/ftv2mlastnode.png b/libfuse/doc/html/ftv2mlastnode.png deleted file mode 100644 index 0b63f6d38c4b9ec907b820192ebe9724ed6eca22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 diff --git a/libfuse/doc/html/ftv2mnode.png b/libfuse/doc/html/ftv2mnode.png deleted file mode 100644 index 0b63f6d38c4b9ec907b820192ebe9724ed6eca22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 diff --git a/libfuse/doc/html/ftv2node.png b/libfuse/doc/html/ftv2node.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/libfuse/doc/html/ftv2plastnode.png b/libfuse/doc/html/ftv2plastnode.png deleted file mode 100644 index c6ee22f937a07d1dbfc27c669d11f8ed13e2f152..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K diff --git a/libfuse/doc/html/ftv2pnode.png b/libfuse/doc/html/ftv2pnode.png deleted file mode 100644 index c6ee22f937a07d1dbfc27c669d11f8ed13e2f152..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K diff --git a/libfuse/doc/html/ftv2splitbar.png b/libfuse/doc/html/ftv2splitbar.png deleted file mode 100644 index fe895f2c58179b471a22d8320b39a4bd7312ec8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T diff --git a/libfuse/doc/html/ftv2vertline.png b/libfuse/doc/html/ftv2vertline.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/libfuse/doc/html/functions.html b/libfuse/doc/html/functions.html deleted file mode 100644 index 7f02f264..00000000 --- a/libfuse/doc/html/functions.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - -fuse: Data Fields - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - - -
-
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
- -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- k -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

- - -

- w -

-
- - - - diff --git a/libfuse/doc/html/functions_vars.html b/libfuse/doc/html/functions_vars.html deleted file mode 100644 index 990fae52..00000000 --- a/libfuse/doc/html/functions_vars.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - -fuse: Data Fields - Variables - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - - -
-
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- k -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

- - -

- w -

-
- - - - diff --git a/libfuse/doc/html/fuse_8h.html b/libfuse/doc/html/fuse_8h.html deleted file mode 100644 index af83459e..00000000 --- a/libfuse/doc/html/fuse_8h.html +++ /dev/null @@ -1,968 +0,0 @@ - - - - - - -fuse: include/fuse.h File Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
- -
-
fuse.h File Reference
-
-
-
#include "fuse_common.h"
-#include <fcntl.h>
-#include <time.h>
-#include <utime.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statvfs.h>
-#include <sys/uio.h>
-#include "fuse_compat.h"
-
- - - - - - - -

-Data Structures

struct  fuse_operations
 
struct  fuse_context
 
struct  fuse_module
 
- - - - - - - -

-Macros

#define fuse_main(argc, argv, op, user_data)   fuse_main_real(argc, argv, op, sizeof(*(op)), user_data)
 
#define FUSE_REGISTER_MODULE(name_, factory_)
 
#define fuse_main   fuse_main_compat2
 
- - - - - -

-Typedefs

typedef int(* fuse_fill_dir_t )(void *buf, const char *name, const struct stat *stbuf, off_t off)
 
typedef void(* fuse_processor_t )(struct fuse *, struct fuse_cmd *, void *)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

struct fuse * fuse_new (struct fuse_chan *ch, struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data)
 
void fuse_destroy (struct fuse *f)
 
int fuse_loop (struct fuse *f)
 
void fuse_exit (struct fuse *f)
 
int fuse_loop_mt (struct fuse *f)
 
struct fuse_contextfuse_get_context (void)
 
int fuse_getgroups (int size, gid_t list[])
 
int fuse_interrupted (void)
 
int fuse_invalidate (struct fuse *f, const char *path)
 
int fuse_main_real (int argc, char *argv[], const struct fuse_operations *op, size_t op_size, void *user_data)
 
int fuse_start_cleanup_thread (struct fuse *fuse)
 
void fuse_stop_cleanup_thread (struct fuse *fuse)
 
int fuse_clean_cache (struct fuse *fuse)
 
struct fuse_fs * fuse_fs_new (const struct fuse_operations *op, size_t op_size, void *user_data)
 
void fuse_register_module (struct fuse_module *mod)
 
struct fuse * fuse_setup (int argc, char *argv[], const struct fuse_operations *op, size_t op_size, char **mountpoint, int *multithreaded, void *user_data)
 
void fuse_teardown (struct fuse *fuse, char *mountpoint)
 
struct fuse_cmd * fuse_read_cmd (struct fuse *f)
 
void fuse_process_cmd (struct fuse *f, struct fuse_cmd *cmd)
 
int fuse_loop_mt_proc (struct fuse *f, fuse_processor_t proc, void *data)
 
int fuse_exited (struct fuse *f)
 
void fuse_set_getcontext_func (struct fuse_context *(*func)(void))
 
struct fuse_session * fuse_get_session (struct fuse *f)
 
-

Detailed Description

-

This file defines the library interface of FUSE

-

IMPORTANT: you should define FUSE_USE_VERSION before including this header. To use the newest API define it to 26 (recommended for any new application), to use the old API define it to 21 (default) 22 or 25, to use the even older 1.X API define it to 11.

-

Macro Definition Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define fuse_main( argc,
 argv,
 op,
 user_data 
)   fuse_main_real(argc, argv, op, sizeof(*(op)), user_data)
-
-

Main function of FUSE.

-

This is for the lazy. This is all that has to be called from the main() function.

-

This function does the following:

    -
  • parses command line options (-d -s and -h)
  • -
  • passes relevant mount options to the fuse_mount()
  • -
  • installs signal handlers for INT, HUP, TERM and PIPE
  • -
  • registers an exit handler to unmount the filesystem on program exit
  • -
  • creates a fuse handle
  • -
  • registers the operations
  • -
  • calls either the single-threaded or the multi-threaded event loop
  • -
-

Note: this is currently implemented as a macro.

-
Parameters
- - - - - -
argcthe argument counter passed to the main() function
argvthe argument vector passed to the main() function
opthe file system operation
user_datauser data supplied in the context during the init() method
-
-
-
Returns
0 on success, nonzero on failure
- -
-
- -
-
- - - - -
#define fuse_main   fuse_main_compat2
-
-

Main function of FUSE.

-

This is for the lazy. This is all that has to be called from the main() function.

-

This function does the following:

    -
  • parses command line options (-d -s and -h)
  • -
  • passes relevant mount options to the fuse_mount()
  • -
  • installs signal handlers for INT, HUP, TERM and PIPE
  • -
  • registers an exit handler to unmount the filesystem on program exit
  • -
  • creates a fuse handle
  • -
  • registers the operations
  • -
  • calls either the single-threaded or the multi-threaded event loop
  • -
-

Note: this is currently implemented as a macro.

-
Parameters
- - - - - -
argcthe argument counter passed to the main() function
argvthe argument vector passed to the main() function
opthe file system operation
user_datauser data supplied in the context during the init() method
-
-
-
Returns
0 on success, nonzero on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define FUSE_REGISTER_MODULE( name_,
 factory_ 
)
-
-Value:
static __attribute__((constructor)) void name_ ## _register(void) \
-
{ \
-
static struct fuse_module mod = \
-
{ #name_, factory_, NULL, NULL, 0 }; \
-
fuse_register_module(&mod); \
-
}
-

Register filesystem module

-

For the parameters, see description of the fields in 'struct fuse_module'

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int(* fuse_fill_dir_t)(void *buf, const char *name, const struct stat *stbuf, off_t off)
-
-

Function to add an entry in a readdir() operation

-
Parameters
- - - - - -
bufthe buffer passed to the readdir() operation
namethe file name of the directory entry
statfile attributes, can be NULL
offoffset of the next entry or zero
-
-
-
Returns
1 if buffer is full, zero otherwise
- -
-
- -
-
- - - - -
typedef void(* fuse_processor_t)(struct fuse *, struct fuse_cmd *, void *)
-
-

Function type used to process commands

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
int fuse_clean_cache (struct fuse * fuse)
-
-

Iterate over cache removing stale entries use in conjunction with "-oremember"

-

NOTE: This is already done for the standard sessions

-
Parameters
- - -
fusestruct fuse pointer for fuse instance
-
-
-
Returns
the number of seconds until the next cleanup
- -
-
- -
-
- - - - - - - - -
void fuse_destroy (struct fuse * f)
-
-

Destroy the FUSE handle.

-

The communication channel attached to the handle is also destroyed.

-

NOTE: This function does not unmount the filesystem. If this is needed, call fuse_unmount() before calling this function.

-
Parameters
- - -
fthe FUSE handle
-
-
- -
-
- -
-
- - - - - - - - -
void fuse_exit (struct fuse * f)
-
-

Exit from event loop

-
Parameters
- - -
fthe FUSE handle
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_exited (struct fuse * f)
-
-

Return the exited flag, which indicates if fuse_exit() has been called

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
struct fuse_fs* fuse_fs_new (const struct fuse_operationsop,
size_t op_size,
void * user_data 
)
-
-

Create a new fuse filesystem object

-

This is usually called from the factory of a fuse module to create a new instance of a filesystem.

-
Parameters
- - - - -
opthe filesystem operations
op_sizethe size of the fuse_operations structure
user_datauser data supplied in the context during the init() method
-
-
-
Returns
a new filesystem object
- -
-
- -
-
- - - - - - - - -
struct fuse_context* fuse_get_context (void )
-
-

Get the current context

-

The context is only valid for the duration of a filesystem operation, and thus must not be stored and used later.

-
Returns
the context
- -
-
- -
-
- - - - - - - - -
struct fuse_session* fuse_get_session (struct fuse * f)
-
-

Get session from fuse object

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_getgroups (int size,
gid_t list[] 
)
-
-

Get the current supplementary group IDs for the current request

-

Similar to the getgroups(2) system call, except the return value is always the total number of group IDs, even if it is larger than the specified size.

-

The current fuse kernel module in linux (as of 2.6.30) doesn't pass the group list to userspace, hence this function needs to parse "/proc/$TID/task/$TID/status" to get the group IDs.

-

This feature may not be supported on all operating systems. In such a case this function will return -ENOSYS.

-
Parameters
- - - -
sizesize of given array
listarray of group IDs to be filled in
-
-
-
Returns
the total number of supplementary group IDs or -errno on failure
- -
-
- -
-
- - - - - - - - -
int fuse_interrupted (void )
-
-

Check if the current request has already been interrupted

-
Returns
1 if the request has been interrupted, 0 otherwise
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_invalidate (struct fuse * f,
const char * path 
)
-
-

Obsolete, doesn't do anything

-
Returns
-EINVAL
- -
-
- -
-
- - - - - - - - -
int fuse_loop (struct fuse * f)
-
-

FUSE event loop.

-

Requests from the kernel are processed, and the appropriate operations are called.

-
Parameters
- - -
fthe FUSE handle
-
-
-
Returns
0 if no error occurred, -1 otherwise
- -
-
- -
-
- - - - - - - - -
int fuse_loop_mt (struct fuse * f)
-
-

FUSE event loop with multiple threads

-

Requests from the kernel are processed, and the appropriate operations are called. Request are processed in parallel by distributing them between multiple threads.

-

Calling this function requires the pthreads library to be linked to the application.

-
Parameters
- - -
fthe FUSE handle
-
-
-
Returns
0 if no error occurred, -1 otherwise
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_loop_mt_proc (struct fuse * f,
fuse_processor_t proc,
void * data 
)
-
-

Multi threaded event loop, which calls the custom command processor function

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_main_real (int argc,
char * argv[],
const struct fuse_operationsop,
size_t op_size,
void * user_data 
)
-
-

The real main function

-

Do not call this directly, use fuse_main()

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct fuse* fuse_new (struct fuse_chan * ch,
struct fuse_argsargs,
const struct fuse_operationsop,
size_t op_size,
void * user_data 
)
-
-

Create a new FUSE filesystem.

-
Parameters
- - - - - - -
chthe communication channel
argsargument vector
opthe filesystem operations
op_sizethe size of the fuse_operations structure
user_datauser data supplied in the context during the init() method
-
-
-
Returns
the created FUSE handle
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void fuse_process_cmd (struct fuse * f,
struct fuse_cmd * cmd 
)
-
-

Process a single command

- -
-
- -
-
- - - - - - - - -
struct fuse_cmd* fuse_read_cmd (struct fuse * f)
-
-

Read a single command. If none are read, return NULL

- -
-
- -
-
- - - - - - - - -
void fuse_register_module (struct fuse_modulemod)
-
-

Register a filesystem module

-

This function is used by FUSE_REGISTER_MODULE and there's usually no need to call it directly

- -
-
- -
-
- - - - - - - - -
void fuse_set_getcontext_func (struct fuse_context *(*)(void) func)
-
-

This function is obsolete and implemented as a no-op

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct fuse* fuse_setup (int argc,
char * argv[],
const struct fuse_operationsop,
size_t op_size,
char ** mountpoint,
int * multithreaded,
void * user_data 
)
-
-

This is the part of fuse_main() before the event loop

- -
-
- -
-
- - - - - - - - -
int fuse_start_cleanup_thread (struct fuse * fuse)
-
-

Start the cleanup thread when using option "remember".

-

This is done automatically by fuse_loop_mt()

Parameters
- - -
fusestruct fuse pointer for fuse instance
-
-
-
Returns
0 on success and -1 on error
- -
-
- -
-
- - - - - - - - -
void fuse_stop_cleanup_thread (struct fuse * fuse)
-
-

Stop the cleanup thread when using option "remember".

-

This is done automatically by fuse_loop_mt()

Parameters
- - -
fusestruct fuse pointer for fuse instance
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void fuse_teardown (struct fuse * fuse,
char * mountpoint 
)
-
-

This is the part of fuse_main() after the event loop

- -
-
-
- - - - diff --git a/libfuse/doc/html/fuse__common_8h.html b/libfuse/doc/html/fuse__common_8h.html deleted file mode 100644 index b9c8231f..00000000 --- a/libfuse/doc/html/fuse__common_8h.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - -fuse: include/fuse_common.h File Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
- -
-
fuse_common.h File Reference
-
-
-
#include "fuse_opt.h"
-#include <stdint.h>
-#include <sys/types.h>
-#include "fuse_common_compat.h"
-
- - - - - - - - - -

-Data Structures

struct  fuse_file_info
 
struct  fuse_conn_info
 
struct  fuse_buf
 
struct  fuse_bufvec
 
- - - - - - - - - -

-Macros

#define FUSE_MAJOR_VERSION   2
 
#define FUSE_MINOR_VERSION   9
 
#define FUSE_CAP_ASYNC_READ   (1 << 0)
 
#define FUSE_IOCTL_COMPAT   (1 << 0)
 
- - - - - -

-Enumerations

enum  fuse_buf_flags { FUSE_BUF_IS_FD = (1 << 1), -FUSE_BUF_FD_SEEK = (1 << 2), -FUSE_BUF_FD_RETRY = (1 << 3) - }
 
enum  fuse_buf_copy_flags { FUSE_BUF_NO_SPLICE = (1 << 1), -FUSE_BUF_FORCE_SPLICE = (1 << 2), -FUSE_BUF_SPLICE_MOVE = (1 << 3), -FUSE_BUF_SPLICE_NONBLOCK = (1 << 4) - }
 
- - - - - - - - - - - - - - - - - - - - - -

-Functions

struct fuse_chan * fuse_mount (const char *mountpoint, struct fuse_args *args)
 
void fuse_unmount (const char *mountpoint, struct fuse_chan *ch)
 
int fuse_parse_cmdline (struct fuse_args *args, char **mountpoint, int *multithreaded, int *foreground)
 
int fuse_daemonize (int foreground)
 
int fuse_version (void)
 
void fuse_pollhandle_destroy (struct fuse_pollhandle *ph)
 
size_t fuse_buf_size (const struct fuse_bufvec *bufv)
 
ssize_t fuse_buf_copy (struct fuse_bufvec *dst, struct fuse_bufvec *src, enum fuse_buf_copy_flags flags)
 
int fuse_set_signal_handlers (struct fuse_session *se)
 
void fuse_remove_signal_handlers (struct fuse_session *se)
 
-

Macro Definition Documentation

- -
-
- - - - -
#define FUSE_CAP_ASYNC_READ   (1 << 0)
-
-

Capability bits for 'fuse_conn_info.capable' and 'fuse_conn_info.want'

-

FUSE_CAP_ASYNC_READ: filesystem supports asynchronous read requests FUSE_CAP_POSIX_LOCKS: filesystem supports "remote" locking FUSE_CAP_ATOMIC_O_TRUNC: filesystem handles the O_TRUNC open flag FUSE_CAP_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." FUSE_CAP_BIG_WRITES: filesystem can handle write size larger than 4kB FUSE_CAP_DONT_MASK: don't apply umask to file mode on create operations FUSE_CAP_SPLICE_WRITE: ability to use splice() to write to the fuse device FUSE_CAP_SPLICE_MOVE: ability to move data to the fuse device with splice() FUSE_CAP_SPLICE_READ: ability to use splice() to read from the fuse device FUSE_CAP_IOCTL_DIR: ioctl support on directories

- -
-
- -
-
- - - - -
#define FUSE_IOCTL_COMPAT   (1 << 0)
-
-

Ioctl flags

-

FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed FUSE_IOCTL_RETRY: retry with new iovecs FUSE_IOCTL_DIR: is a directory

-

FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs

- -
-
- -
-
- - - - -
#define FUSE_MAJOR_VERSION   2
-
-

Major version of FUSE library interface

- -
-
- -
-
- - - - -
#define FUSE_MINOR_VERSION   9
-
-

Minor version of FUSE library interface

- -
-
-

Enumeration Type Documentation

- -
-
- - - - -
enum fuse_buf_copy_flags
-
-

Buffer copy flags

- - - - - -
Enumerator
FUSE_BUF_NO_SPLICE  -

Don't use splice(2)

-

Always fall back to using read and write instead of splice(2) to copy data from one file descriptor to another.

-

If this flag is not set, then only fall back if splice is unavailable.

-
FUSE_BUF_FORCE_SPLICE  -

Force splice

-

Always use splice(2) to copy data from one file descriptor to another. If splice is not available, return -EINVAL.

-
FUSE_BUF_SPLICE_MOVE  -

Try to move data with splice.

-

If splice is used, try to move pages from the source to the destination instead of copying. See documentation of SPLICE_F_MOVE in splice(2) man page.

-
FUSE_BUF_SPLICE_NONBLOCK  -

Don't block on the pipe when copying data with splice

-

Makes the operations on the pipe non-blocking (if the pipe is full or empty). See SPLICE_F_NONBLOCK in the splice(2) man page.

-
- -
-
- -
-
- - - - -
enum fuse_buf_flags
-
-

Buffer flags

- - - - -
Enumerator
FUSE_BUF_IS_FD  -

Buffer contains a file descriptor

-

If this flag is set, the .fd field is valid, otherwise the .mem fields is valid.

-
FUSE_BUF_FD_SEEK  -

Seek on the file descriptor

-

If this flag is set then the .pos field is valid and is used to seek to the given offset before performing operation on file descriptor.

-
FUSE_BUF_FD_RETRY  -

Retry operation on file descriptor

-

If this flag is set then retry operation on file descriptor until .size bytes have been copied or an error or EOF is detected.

-
- -
-
-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
ssize_t fuse_buf_copy (struct fuse_bufvecdst,
struct fuse_bufvecsrc,
enum fuse_buf_copy_flags flags 
)
-
-

Copy data from one buffer vector to another

-
Parameters
- - - - -
dstdestination buffer vector
srcsource buffer vector
flagsflags controlling the copy
-
-
-
Returns
actual number of bytes copied or -errno on error
- -
-
- -
-
- - - - - - - - -
size_t fuse_buf_size (const struct fuse_bufvecbufv)
-
-

Get total size of data in a fuse buffer vector

-
Parameters
- - -
bufvbuffer vector
-
-
-
Returns
size of data
- -
-
- -
-
- - - - - - - - -
int fuse_daemonize (int foreground)
-
-

Go into the background

-
Parameters
- - -
foregroundif true, stay in the foreground
-
-
-
Returns
0 on success, -1 on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fuse_chan* fuse_mount (const char * mountpoint,
struct fuse_argsargs 
)
-
-

Create a FUSE mountpoint

-

Returns a control file descriptor suitable for passing to fuse_new()

-
Parameters
- - - -
mountpointthe mount point path
argsargument vector
-
-
-
Returns
the communication channel on success, NULL on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_parse_cmdline (struct fuse_argsargs,
char ** mountpoint,
int * multithreaded,
int * foreground 
)
-
-

Parse common options

-

The following options are parsed:

-

'-f' foreground '-d' '-odebug' foreground, but keep the debug option '-s' single threaded '-h' '–help' help '-ho' help without header '-ofsname=..' file system name, if not present, then set to the program name

-

All parameters may be NULL

-
Parameters
- - - - - -
argsargument vector
mountpointthe returned mountpoint, should be freed after use
multithreadedset to 1 unless the '-s' option is present
foregroundset to 1 if one of the relevant options is present
-
-
-
Returns
0 on success, -1 on failure
- -
-
- -
-
- - - - - - - - -
void fuse_pollhandle_destroy (struct fuse_pollhandle * ph)
-
-

Destroy poll handle

-
Parameters
- - -
phthe poll handle
-
-
- -
-
- -
-
- - - - - - - - -
void fuse_remove_signal_handlers (struct fuse_session * se)
-
-

Restore default signal handlers

-

Resets global session. After this fuse_set_signal_handlers() may be called again.

-
Parameters
- - -
sethe same session as given in fuse_set_signal_handlers()
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_set_signal_handlers (struct fuse_session * se)
-
-

Exit session on HUP, TERM and INT signals and ignore PIPE signal

-

Stores session in a global variable. May only be called once per process until fuse_remove_signal_handlers() is called.

-
Parameters
- - -
sethe session to exit
-
-
-
Returns
0 on success, -1 on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void fuse_unmount (const char * mountpoint,
struct fuse_chan * ch 
)
-
-

Umount a FUSE mountpoint

-
Parameters
- - - -
mountpointthe mount point path
chthe communication channel
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_version (void )
-
-

Get the version of the library

-
Returns
the version
- -
-
-
- - - - diff --git a/libfuse/doc/html/fuse__lowlevel_8h.html b/libfuse/doc/html/fuse__lowlevel_8h.html deleted file mode 100644 index db0b1061..00000000 --- a/libfuse/doc/html/fuse__lowlevel_8h.html +++ /dev/null @@ -1,2291 +0,0 @@ - - - - - - -fuse: include/fuse_lowlevel.h File Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
- -
-
fuse_lowlevel.h File Reference
-
-
-
#include "fuse_common.h"
-#include <utime.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/statvfs.h>
-#include <sys/uio.h>
-#include "fuse_lowlevel_compat.h"
-
- - - - - - - - - - - -

-Data Structures

struct  fuse_entry_param
 
struct  fuse_ctx
 
struct  fuse_lowlevel_ops
 
struct  fuse_session_ops
 
struct  fuse_chan_ops
 
- - - -

-Macros

#define FUSE_ROOT_ID   1
 
- - - - - - - -

-Typedefs

typedef unsigned long fuse_ino_t
 
typedef struct fuse_req * fuse_req_t
 
typedef void(* fuse_interrupt_func_t )(fuse_req_t req, void *data)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

int fuse_reply_err (fuse_req_t req, int err)
 
void fuse_reply_none (fuse_req_t req)
 
int fuse_reply_entry (fuse_req_t req, const struct fuse_entry_param *e)
 
int fuse_reply_create (fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *fi)
 
int fuse_reply_attr (fuse_req_t req, const struct stat *attr, double attr_timeout)
 
int fuse_reply_readlink (fuse_req_t req, const char *link)
 
int fuse_reply_open (fuse_req_t req, const struct fuse_file_info *fi)
 
int fuse_reply_write (fuse_req_t req, size_t count)
 
int fuse_reply_buf (fuse_req_t req, const char *buf, size_t size)
 
int fuse_reply_data (fuse_req_t req, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
 
int fuse_reply_iov (fuse_req_t req, const struct iovec *iov, int count)
 
int fuse_reply_statfs (fuse_req_t req, const struct statvfs *stbuf)
 
int fuse_reply_xattr (fuse_req_t req, size_t count)
 
int fuse_reply_lock (fuse_req_t req, const struct flock *lock)
 
int fuse_reply_bmap (fuse_req_t req, uint64_t idx)
 
size_t fuse_add_direntry (fuse_req_t req, char *buf, size_t bufsize, const char *name, const struct stat *stbuf, off_t off)
 
int fuse_reply_ioctl_retry (fuse_req_t req, const struct iovec *in_iov, size_t in_count, const struct iovec *out_iov, size_t out_count)
 
int fuse_reply_ioctl (fuse_req_t req, int result, const void *buf, size_t size)
 
int fuse_reply_ioctl_iov (fuse_req_t req, int result, const struct iovec *iov, int count)
 
int fuse_reply_poll (fuse_req_t req, unsigned revents)
 
int fuse_lowlevel_notify_poll (struct fuse_pollhandle *ph)
 
int fuse_lowlevel_notify_inval_inode (struct fuse_chan *ch, fuse_ino_t ino, off_t off, off_t len)
 
int fuse_lowlevel_notify_inval_entry (struct fuse_chan *ch, fuse_ino_t parent, const char *name, size_t namelen)
 
int fuse_lowlevel_notify_delete (struct fuse_chan *ch, fuse_ino_t parent, fuse_ino_t child, const char *name, size_t namelen)
 
int fuse_lowlevel_notify_store (struct fuse_chan *ch, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv, enum fuse_buf_copy_flags flags)
 
int fuse_lowlevel_notify_retrieve (struct fuse_chan *ch, fuse_ino_t ino, size_t size, off_t offset, void *cookie)
 
void * fuse_req_userdata (fuse_req_t req)
 
const struct fuse_ctxfuse_req_ctx (fuse_req_t req)
 
int fuse_req_getgroups (fuse_req_t req, int size, gid_t list[])
 
void fuse_req_interrupt_func (fuse_req_t req, fuse_interrupt_func_t func, void *data)
 
int fuse_req_interrupted (fuse_req_t req)
 
struct fuse_session * fuse_lowlevel_new (struct fuse_args *args, const struct fuse_lowlevel_ops *op, size_t op_size, void *userdata)
 
struct fuse_session * fuse_session_new (struct fuse_session_ops *op, void *data)
 
void fuse_session_add_chan (struct fuse_session *se, struct fuse_chan *ch)
 
void fuse_session_remove_chan (struct fuse_chan *ch)
 
struct fuse_chan * fuse_session_next_chan (struct fuse_session *se, struct fuse_chan *ch)
 
void fuse_session_process (struct fuse_session *se, const char *buf, size_t len, struct fuse_chan *ch)
 
void fuse_session_process_buf (struct fuse_session *se, const struct fuse_buf *buf, struct fuse_chan *ch)
 
int fuse_session_receive_buf (struct fuse_session *se, struct fuse_buf *buf, struct fuse_chan **chp)
 
void fuse_session_destroy (struct fuse_session *se)
 
void fuse_session_exit (struct fuse_session *se)
 
void fuse_session_reset (struct fuse_session *se)
 
int fuse_session_exited (struct fuse_session *se)
 
void * fuse_session_data (struct fuse_session *se)
 
int fuse_session_loop (struct fuse_session *se)
 
int fuse_session_loop_mt (struct fuse_session *se)
 
struct fuse_chan * fuse_chan_new (struct fuse_chan_ops *op, int fd, size_t bufsize, void *data)
 
int fuse_chan_fd (struct fuse_chan *ch)
 
size_t fuse_chan_bufsize (struct fuse_chan *ch)
 
void * fuse_chan_data (struct fuse_chan *ch)
 
struct fuse_session * fuse_chan_session (struct fuse_chan *ch)
 
int fuse_chan_recv (struct fuse_chan **ch, char *buf, size_t size)
 
int fuse_chan_send (struct fuse_chan *ch, const struct iovec iov[], size_t count)
 
void fuse_chan_destroy (struct fuse_chan *ch)
 
-

Detailed Description

-

Low level API

-

IMPORTANT: you should define FUSE_USE_VERSION before including this header. To use the newest API define it to 26 (recommended for any new application), to use the old API define it to 24 (default) or 25

-

Macro Definition Documentation

- -
-
- - - - -
#define FUSE_ROOT_ID   1
-
-

The node ID of the root inode

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef unsigned long fuse_ino_t
-
-

Inode number type

- -
-
- -
-
- - - - -
typedef void(* fuse_interrupt_func_t)(fuse_req_t req, void *data)
-
-

Callback function for an interrupt

-
Parameters
- - - -
reqinterrupted request
datauser data
-
-
- -
-
- -
-
- - - - -
typedef struct fuse_req* fuse_req_t
-
-

Request pointer type

- -
-
-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
size_t fuse_add_direntry (fuse_req_t req,
char * buf,
size_t bufsize,
const char * name,
const struct stat * stbuf,
off_t off 
)
-
-

Add a directory entry to the buffer

-

Buffer needs to be large enough to hold the entry. If it's not, then the entry is not filled in but the size of the entry is still returned. The caller can check this by comparing the bufsize parameter with the returned entry size. If the entry size is larger than the buffer size, the operation failed.

-

From the 'stbuf' argument the st_ino field and bits 12-15 of the st_mode field are used. The other fields are ignored.

-

Note: offsets do not necessarily represent physical offsets, and could be any marker, that enables the implementation to find a specific point in the directory stream.

-
Parameters
- - - - - - - -
reqrequest handle
bufthe point where the new entry will be added to the buffer
bufsizeremaining size of the buffer
namethe name of the entry
stbufthe file attributes
offthe offset of the next entry
-
-
-
Returns
the space needed for the entry
- -
-
- -
-
- - - - - - - - -
size_t fuse_chan_bufsize (struct fuse_chan * ch)
-
-

Query the minimal receive buffer size

-
Parameters
- - -
chthe channel
-
-
-
Returns
the buffer size passed to fuse_chan_new()
- -
-
- -
-
- - - - - - - - -
void* fuse_chan_data (struct fuse_chan * ch)
-
-

Query the user data

-
Parameters
- - -
chthe channel
-
-
-
Returns
the user data passed to fuse_chan_new()
- -
-
- -
-
- - - - - - - - -
void fuse_chan_destroy (struct fuse_chan * ch)
-
-

Destroy a channel

-
Parameters
- - -
chthe channel
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_chan_fd (struct fuse_chan * ch)
-
-

Query the file descriptor of the channel

-
Parameters
- - -
chthe channel
-
-
-
Returns
the file descriptor passed to fuse_chan_new()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct fuse_chan* fuse_chan_new (struct fuse_chan_opsop,
int fd,
size_t bufsize,
void * data 
)
-
-

Create a new channel

-
Parameters
- - - - - -
opchannel operations
fdfile descriptor of the channel
bufsizethe minimal receive buffer size
datauser data
-
-
-
Returns
the new channel object, or NULL on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_chan_recv (struct fuse_chan ** ch,
char * buf,
size_t size 
)
-
-

Receive a raw request

-

A return value of -ENODEV means, that the filesystem was unmounted

-
Parameters
- - - - -
chpointer to the channel
bufthe buffer to store the request in
sizethe size of the buffer
-
-
-
Returns
the actual size of the raw request, or -errno on error
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_chan_send (struct fuse_chan * ch,
const struct iovec iov[],
size_t count 
)
-
-

Send a raw reply

-

A return value of -ENOENT means, that the request was interrupted, and the reply was discarded

-
Parameters
- - - - -
chthe channel
iovvector of blocks
countthe number of blocks in vector
-
-
-
Returns
zero on success, -errno on failure
- -
-
- -
-
- - - - - - - - -
struct fuse_session* fuse_chan_session (struct fuse_chan * ch)
-
-

Query the session to which this channel is assigned

-
Parameters
- - -
chthe channel
-
-
-
Returns
the session, or NULL if the channel is not assigned
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct fuse_session* fuse_lowlevel_new (struct fuse_argsargs,
const struct fuse_lowlevel_opsop,
size_t op_size,
void * userdata 
)
-
-

Create a low level session

-
Parameters
- - - - - -
argsargument vector
opthe low level filesystem operations
op_sizesizeof(struct fuse_lowlevel_ops)
userdatauser data
-
-
-
Returns
the created session object, or NULL on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_lowlevel_notify_delete (struct fuse_chan * ch,
fuse_ino_t parent,
fuse_ino_t child,
const char * name,
size_t namelen 
)
-
-

Notify to invalidate parent attributes and delete the dentry matching parent/name if the dentry's inode number matches child (otherwise it will invalidate the matching dentry).

-

To avoid a deadlock don't call this function from a filesystem operation and don't call it with a lock held that can also be held by a filesystem operation.

-
Parameters
- - - - - - -
chthe channel through which to send the notification
parentinode number
childinode number
namefile name
namelenstrlen() of file name
-
-
-
Returns
zero for success, -errno for failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_lowlevel_notify_inval_entry (struct fuse_chan * ch,
fuse_ino_t parent,
const char * name,
size_t namelen 
)
-
-

Notify to invalidate parent attributes and the dentry matching parent/name

-

To avoid a deadlock don't call this function from a filesystem operation and don't call it with a lock held that can also be held by a filesystem operation.

-
Parameters
- - - - - -
chthe channel through which to send the invalidation
parentinode number
namefile name
namelenstrlen() of file name
-
-
-
Returns
zero for success, -errno for failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_lowlevel_notify_inval_inode (struct fuse_chan * ch,
fuse_ino_t ino,
off_t off,
off_t len 
)
-
-

Notify to invalidate cache for an inode

-
Parameters
- - - - - -
chthe channel through which to send the invalidation
inothe inode number
offthe offset in the inode where to start invalidating or negative to invalidate attributes only
lenthe amount of cache to invalidate or 0 for all
-
-
-
Returns
zero for success, -errno for failure
- -
-
- -
-
- - - - - - - - -
int fuse_lowlevel_notify_poll (struct fuse_pollhandle * ph)
-
-

Notify IO readiness event

-

For more information, please read comment for poll operation.

-
Parameters
- - -
phpoll handle to notify IO readiness event for
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_lowlevel_notify_retrieve (struct fuse_chan * ch,
fuse_ino_t ino,
size_t size,
off_t offset,
void * cookie 
)
-
-

Retrieve data from the kernel buffers

-

Retrieve data in the kernel buffers belonging to the given inode. If successful then the retrieve_reply() method will be called with the returned data.

-

Only present pages are returned in the retrieve reply. Retrieving stops when it finds a non-present page and only data prior to that is returned.

-

If this function returns an error, then the retrieve will not be completed and no reply will be sent.

-

This function doesn't change the dirty state of pages in the kernel buffer. For dirty pages the write() method will be called regardless of having been retrieved previously.

-
Parameters
- - - - - - -
chthe channel through which to send the invalidation
inothe inode number
sizethe number of bytes to retrieve
offsetthe starting offset into the file to retrieve from
cookieuser data to supply to the reply callback
-
-
-
Returns
zero for success, -errno for failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_lowlevel_notify_store (struct fuse_chan * ch,
fuse_ino_t ino,
off_t offset,
struct fuse_bufvecbufv,
enum fuse_buf_copy_flags flags 
)
-
-

Store data to the kernel buffers

-

Synchronously store data in the kernel buffers belonging to the given inode. The stored data is marked up-to-date (no read will be performed against it, unless it's invalidated or evicted from the cache).

-

If the stored data overflows the current file size, then the size is extended, similarly to a write(2) on the filesystem.

-

If this function returns an error, then the store wasn't fully completed, but it may have been partially completed.

-
Parameters
- - - - - - -
chthe channel through which to send the invalidation
inothe inode number
offsetthe starting offset into the file to store to
bufvbuffer vector
flagsflags controlling the copy
-
-
-
Returns
zero for success, -errno for failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_attr (fuse_req_t req,
const struct stat * attr,
double attr_timeout 
)
-
-

Reply with attributes

-

Possible requests: getattr, setattr

-
Parameters
- - - - -
reqrequest handle
attrthe attributes
attr_timeoutvalidity timeout (in seconds) for the attributes
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_bmap (fuse_req_t req,
uint64_t idx 
)
-
-

Reply with block index

-

Possible requests: bmap

-
Parameters
- - - -
reqrequest handle
idxblock index within device
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_buf (fuse_req_t req,
const char * buf,
size_t size 
)
-
-

Reply with data

-

Possible requests: read, readdir, getxattr, listxattr

-
Parameters
- - - - -
reqrequest handle
bufbuffer containing data
sizethe size of data in bytes
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_create (fuse_req_t req,
const struct fuse_entry_parame,
const struct fuse_file_infofi 
)
-
-

Reply with a directory entry and open parameters

-

currently the following members of 'fi' are used: fh, direct_io, keep_cache

-

Possible requests: create

-

Side effects: increments the lookup count on success

-
Parameters
- - - - -
reqrequest handle
ethe entry parameters
fifile information
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_data (fuse_req_t req,
struct fuse_bufvecbufv,
enum fuse_buf_copy_flags flags 
)
-
-

Reply with data copied/moved from buffer(s)

-

Possible requests: read, readdir, getxattr, listxattr

-
Parameters
- - - - -
reqrequest handle
bufvbuffer vector
flagsflags controlling the copy
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_entry (fuse_req_t req,
const struct fuse_entry_parame 
)
-
-

Reply with a directory entry

-

Possible requests: lookup, mknod, mkdir, symlink, link

-

Side effects: increments the lookup count on success

-
Parameters
- - - -
reqrequest handle
ethe entry parameters
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_err (fuse_req_t req,
int err 
)
-
-

Reply with an error code or success

-

Possible requests: all except forget

-

unlink, rmdir, rename, flush, release, fsync, fsyncdir, setxattr, removexattr and setlk may send a zero code

-
Parameters
- - - -
reqrequest handle
errthe positive error value, or zero for success
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_ioctl (fuse_req_t req,
int result,
const void * buf,
size_t size 
)
-
-

Reply to finish ioctl

-

Possible requests: ioctl

-
Parameters
- - - - - -
reqrequest handle
resultresult to be passed to the caller
bufbuffer containing output data
sizelength of output data
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_ioctl_iov (fuse_req_t req,
int result,
const struct iovec * iov,
int count 
)
-
-

Reply to finish ioctl with iov buffer

-

Possible requests: ioctl

-
Parameters
- - - - - -
reqrequest handle
resultresult to be passed to the caller
iovthe vector containing the data
countthe size of vector
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_ioctl_retry (fuse_req_t req,
const struct iovec * in_iov,
size_t in_count,
const struct iovec * out_iov,
size_t out_count 
)
-
-

Reply to ask for data fetch and output buffer preparation. ioctl will be retried with the specified input data fetched and output buffer prepared.

-

Possible requests: ioctl

-
Parameters
- - - - - - -
reqrequest handle
in_ioviovec specifying data to fetch from the caller
in_countnumber of entries in in_iov
out_ioviovec specifying addresses to write output to
out_countnumber of entries in out_iov
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_reply_iov (fuse_req_t req,
const struct iovec * iov,
int count 
)
-
-

Reply with data vector

-

Possible requests: read, readdir, getxattr, listxattr

-
Parameters
- - - - -
reqrequest handle
iovthe vector containing the data
countthe size of vector
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_lock (fuse_req_t req,
const struct flock * lock 
)
-
-

Reply with file lock information

-

Possible requests: getlk

-
Parameters
- - - -
reqrequest handle
lockthe lock information
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - -
void fuse_reply_none (fuse_req_t req)
-
-

Don't send reply

-

Possible requests: forget

-
Parameters
- - -
reqrequest handle
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_open (fuse_req_t req,
const struct fuse_file_infofi 
)
-
-

Reply with open parameters

-

currently the following members of 'fi' are used: fh, direct_io, keep_cache

-

Possible requests: open, opendir

-
Parameters
- - - -
reqrequest handle
fifile information
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_poll (fuse_req_t req,
unsigned revents 
)
-
-

Reply with poll result event mask

-
Parameters
- - - -
reqrequest handle
reventspoll result event mask
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_readlink (fuse_req_t req,
const char * link 
)
-
-

Reply with the contents of a symbolic link

-

Possible requests: readlink

-
Parameters
- - - -
reqrequest handle
linksymbolic link contents
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_statfs (fuse_req_t req,
const struct statvfs * stbuf 
)
-
-

Reply with filesystem statistics

-

Possible requests: statfs

-
Parameters
- - - -
reqrequest handle
stbuffilesystem statistics
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_write (fuse_req_t req,
size_t count 
)
-
-

Reply with number of bytes written

-

Possible requests: write

-
Parameters
- - - -
reqrequest handle
countthe number of bytes written
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_reply_xattr (fuse_req_t req,
size_t count 
)
-
-

Reply with needed buffer size

-

Possible requests: getxattr, listxattr

-
Parameters
- - - -
reqrequest handle
countthe buffer size needed in bytes
-
-
-
Returns
zero for success, -errno for failure to send reply
- -
-
- -
-
- - - - - - - - -
const struct fuse_ctx* fuse_req_ctx (fuse_req_t req)
-
-

Get the context from the request

-

The pointer returned by this function will only be valid for the request's lifetime

-
Parameters
- - -
reqrequest handle
-
-
-
Returns
the context structure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_req_getgroups (fuse_req_t req,
int size,
gid_t list[] 
)
-
-

Get the current supplementary group IDs for the specified request

-

Similar to the getgroups(2) system call, except the return value is always the total number of group IDs, even if it is larger than the specified size.

-

The current fuse kernel module in linux (as of 2.6.30) doesn't pass the group list to userspace, hence this function needs to parse "/proc/$TID/task/$TID/status" to get the group IDs.

-

This feature may not be supported on all operating systems. In such a case this function will return -ENOSYS.

-
Parameters
- - - - -
reqrequest handle
sizesize of given array
listarray of group IDs to be filled in
-
-
-
Returns
the total number of supplementary group IDs or -errno on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void fuse_req_interrupt_func (fuse_req_t req,
fuse_interrupt_func_t func,
void * data 
)
-
-

Register/unregister callback for an interrupt

-

If an interrupt has already happened, then the callback function is called from within this function, hence it's not possible for interrupts to be lost.

-
Parameters
- - - - -
reqrequest handle
functhe callback function or NULL for unregister
datauser data passed to the callback function
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_req_interrupted (fuse_req_t req)
-
-

Check if a request has already been interrupted

-
Parameters
- - -
reqrequest handle
-
-
-
Returns
1 if the request has been interrupted, 0 otherwise
- -
-
- -
-
- - - - - - - - -
void* fuse_req_userdata (fuse_req_t req)
-
-

Get the userdata from the request

-
Parameters
- - -
reqrequest handle
-
-
-
Returns
the user data passed to fuse_lowlevel_new()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void fuse_session_add_chan (struct fuse_session * se,
struct fuse_chan * ch 
)
-
-

Assign a channel to a session

-

Note: currently only a single channel may be assigned. This may change in the future

-

If a session is destroyed, the assigned channel is also destroyed

-
Parameters
- - - -
sethe session
chthe channel
-
-
- -
-
- -
-
- - - - - - - - -
void* fuse_session_data (struct fuse_session * se)
-
-

Get the user data provided to the session

-
Parameters
- - -
sethe session
-
-
-
Returns
the user data
- -
-
- -
-
- - - - - - - - -
void fuse_session_destroy (struct fuse_session * se)
-
-

Destroy a session

-
Parameters
- - -
sethe session
-
-
- -
-
- -
-
- - - - - - - - -
void fuse_session_exit (struct fuse_session * se)
-
-

Exit a session

-
Parameters
- - -
sethe session
-
-
- -
-
- -
-
- - - - - - - - -
int fuse_session_exited (struct fuse_session * se)
-
-

Query the exited status of a session

-
Parameters
- - -
sethe session
-
-
-
Returns
1 if exited, 0 if not exited
- -
-
- -
-
- - - - - - - - -
int fuse_session_loop (struct fuse_session * se)
-
-

Enter a single threaded event loop

-
Parameters
- - -
sethe session
-
-
-
Returns
0 on success, -1 on error
- -
-
- -
-
- - - - - - - - -
int fuse_session_loop_mt (struct fuse_session * se)
-
-

Enter a multi-threaded event loop

-
Parameters
- - -
sethe session
-
-
-
Returns
0 on success, -1 on error
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fuse_session* fuse_session_new (struct fuse_session_opsop,
void * data 
)
-
-

Create a new session

-
Parameters
- - - -
opsession operations
datauser data
-
-
-
Returns
new session object, or NULL on failure
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fuse_chan* fuse_session_next_chan (struct fuse_session * se,
struct fuse_chan * ch 
)
-
-

Iterate over the channels assigned to a session

-

The iterating function needs to start with a NULL channel, and after that needs to pass the previously returned channel to the function.

-
Parameters
- - - -
sethe session
chthe previous channel, or NULL
-
-
-
Returns
the next channel, or NULL if no more channels exist
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fuse_session_process (struct fuse_session * se,
const char * buf,
size_t len,
struct fuse_chan * ch 
)
-
-

Process a raw request

-
Parameters
- - - - - -
sethe session
bufbuffer containing the raw request
lenrequest length
chchannel on which the request was received
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void fuse_session_process_buf (struct fuse_session * se,
const struct fuse_bufbuf,
struct fuse_chan * ch 
)
-
-

Process a raw request supplied in a generic buffer

-

This is a more generic version of fuse_session_process(). The fuse_buf may contain a memory buffer or a pipe file descriptor.

-
Parameters
- - - - -
sethe session
bufthe fuse_buf containing the request
chchannel on which the request was received
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_session_receive_buf (struct fuse_session * se,
struct fuse_bufbuf,
struct fuse_chan ** chp 
)
-
-

Receive a raw request supplied in a generic buffer

-

This is a more generic version of fuse_chan_recv(). The fuse_buf supplied to this function contains a suitably allocated memory buffer. This may be overwritten with a file descriptor buffer.

-
Parameters
- - - - -
sethe session
bufthe fuse_buf to store the request in
chppointer to the channel
-
-
-
Returns
the actual size of the raw request, or -errno on error
- -
-
- -
-
- - - - - - - - -
void fuse_session_remove_chan (struct fuse_chan * ch)
-
-

Remove a channel from a session

-

If the channel is not assigned to a session, then this is a no-op

-
Parameters
- - -
chthe channel to remove
-
-
- -
-
- -
-
- - - - - - - - -
void fuse_session_reset (struct fuse_session * se)
-
-

Reset the exited status of a session

-
Parameters
- - -
sethe session
-
-
- -
-
-
- - - - diff --git a/libfuse/doc/html/fuse__opt_8h.html b/libfuse/doc/html/fuse__opt_8h.html deleted file mode 100644 index df14b5bb..00000000 --- a/libfuse/doc/html/fuse__opt_8h.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - -fuse: include/fuse_opt.h File Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
- -
-
fuse_opt.h File Reference
-
-
- - - - - - -

-Data Structures

struct  fuse_opt
 
struct  fuse_args
 
- - - - - - - - - - - - - - - -

-Macros

#define FUSE_OPT_KEY(templ, key)   { templ, -1U, key }
 
#define FUSE_OPT_END   { NULL, 0, 0 }
 
#define FUSE_ARGS_INIT(argc, argv)   { argc, argv, 0 }
 
#define FUSE_OPT_KEY_OPT   -1
 
#define FUSE_OPT_KEY_NONOPT   -2
 
#define FUSE_OPT_KEY_KEEP   -3
 
#define FUSE_OPT_KEY_DISCARD   -4
 
- - - -

-Typedefs

typedef int(* fuse_opt_proc_t )(void *data, const char *arg, int key, struct fuse_args *outargs)
 
- - - - - - - - - - - - - - - -

-Functions

int fuse_opt_parse (struct fuse_args *args, void *data, const struct fuse_opt opts[], fuse_opt_proc_t proc)
 
int fuse_opt_add_opt (char **opts, const char *opt)
 
int fuse_opt_add_opt_escaped (char **opts, const char *opt)
 
int fuse_opt_add_arg (struct fuse_args *args, const char *arg)
 
int fuse_opt_insert_arg (struct fuse_args *args, int pos, const char *arg)
 
void fuse_opt_free_args (struct fuse_args *args)
 
int fuse_opt_match (const struct fuse_opt opts[], const char *opt)
 
-

Detailed Description

-

This file defines the option parsing interface of FUSE

-

Macro Definition Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
#define FUSE_ARGS_INIT( argc,
 argv 
)   { argc, argv, 0 }
-
-

Initializer for 'struct fuse_args'

- -
-
- -
-
- - - - -
#define FUSE_OPT_END   { NULL, 0, 0 }
-
-

Last option. An array of 'struct fuse_opt' must end with a NULL template value

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define FUSE_OPT_KEY( templ,
 key 
)   { templ, -1U, key }
-
-

Key option. In case of a match, the processing function will be called with the specified key.

- -
-
- -
-
- - - - -
#define FUSE_OPT_KEY_DISCARD   -4
-
-

Special key value for options to discard

-

Argument is not passed to processing function, but behave as if the processing function returned zero

- -
-
- -
-
- - - - -
#define FUSE_OPT_KEY_KEEP   -3
-
-

Special key value for options to keep

-

Argument is not passed to processing function, but behave as if the processing function returned 1

- -
-
- -
-
- - - - -
#define FUSE_OPT_KEY_NONOPT   -2
-
-

Key value passed to the processing function for all non-options

-

Non-options are the arguments beginning with a character other than '-' or all arguments after the special '–' option

- -
-
- -
-
- - - - -
#define FUSE_OPT_KEY_OPT   -1
-
-

Key value passed to the processing function if an option did not match any template

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int(* fuse_opt_proc_t)(void *data, const char *arg, int key, struct fuse_args *outargs)
-
-

Processing function

-

This function is called if

    -
  • option did not match any 'struct fuse_opt'
  • -
  • argument is a non-option
  • -
  • option did match and offset was set to -1
  • -
-

The 'arg' parameter will always contain the whole argument or option including the parameter if exists. A two-argument option ("-x foo") is always converted to single argument option of the form "-xfoo" before this function is called.

-

Options of the form '-ofoo' are passed to this function without the '-o' prefix.

-

The return value of this function determines whether this argument is to be inserted into the output argument vector, or discarded.

-
Parameters
- - - - - -
datais the user data passed to the fuse_opt_parse() function
argis the whole argument or option
keydetermines why the processing function was called
outargsthe current output argument list
-
-
-
Returns
-1 on error, 0 if arg is to be discarded, 1 if arg should be kept
- -
-
-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_opt_add_arg (struct fuse_argsargs,
const char * arg 
)
-
-

Add an argument to a NULL terminated argument vector

-
Parameters
- - - -
argsis the structure containing the current argument list
argis the new argument to add
-
-
-
Returns
-1 on allocation error, 0 on success
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_opt_add_opt (char ** opts,
const char * opt 
)
-
-

Add an option to a comma separated option list

-
Parameters
- - - -
optsis a pointer to an option list, may point to a NULL value
optis the option to add
-
-
-
Returns
-1 on allocation error, 0 on success
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_opt_add_opt_escaped (char ** opts,
const char * opt 
)
-
-

Add an option, escaping commas, to a comma separated option list

-
Parameters
- - - -
optsis a pointer to an option list, may point to a NULL value
optis the option to add
-
-
-
Returns
-1 on allocation error, 0 on success
- -
-
- -
-
- - - - - - - - -
void fuse_opt_free_args (struct fuse_argsargs)
-
-

Free the contents of argument list

-

The structure itself is not freed

-
Parameters
- - -
argsis the structure containing the argument list
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_opt_insert_arg (struct fuse_argsargs,
int pos,
const char * arg 
)
-
-

Add an argument at the specified position in a NULL terminated argument vector

-

Adds the argument to the N-th position. This is useful for adding options at the beginning of the array which must not come after the special '–' option.

-
Parameters
- - - - -
argsis the structure containing the current argument list
posis the position at which to add the argument
argis the new argument to add
-
-
-
Returns
-1 on allocation error, 0 on success
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int fuse_opt_match (const struct fuse_opt opts[],
const char * opt 
)
-
-

Check if an option matches

-
Parameters
- - - -
optsis the option description array
optis the option to match
-
-
-
Returns
1 if a match is found, 0 if not
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int fuse_opt_parse (struct fuse_argsargs,
void * data,
const struct fuse_opt opts[],
fuse_opt_proc_t proc 
)
-
-

Option parsing function

-

If 'args' was returned from a previous call to fuse_opt_parse() or it was constructed from

-

A NULL 'args' is equivalent to an empty argument vector

-

A NULL 'opts' is equivalent to an 'opts' array containing a single end marker

-

A NULL 'proc' is equivalent to a processing function always returning '1'

-
Parameters
- - - - - -
argsis the input and output argument list
datais the user data
optsis the option description array
procis the processing function
-
-
-
Returns
-1 on error, 0 on success
- -
-
-
- - - - diff --git a/libfuse/doc/html/globals.html b/libfuse/doc/html/globals.html deleted file mode 100644 index e19f1d7e..00000000 --- a/libfuse/doc/html/globals.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - - -
-
-
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
- -

- f -

-
- - - - diff --git a/libfuse/doc/html/globals_defs.html b/libfuse/doc/html/globals_defs.html deleted file mode 100644 index 6bc95384..00000000 --- a/libfuse/doc/html/globals_defs.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
-
- - - - diff --git a/libfuse/doc/html/globals_enum.html b/libfuse/doc/html/globals_enum.html deleted file mode 100644 index 8464b436..00000000 --- a/libfuse/doc/html/globals_enum.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
-
- - - - diff --git a/libfuse/doc/html/globals_eval.html b/libfuse/doc/html/globals_eval.html deleted file mode 100644 index 33b730c6..00000000 --- a/libfuse/doc/html/globals_eval.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
-
- - - - diff --git a/libfuse/doc/html/globals_func.html b/libfuse/doc/html/globals_func.html deleted file mode 100644 index 6153e771..00000000 --- a/libfuse/doc/html/globals_func.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - - -
-
-  - -

- f -

-
- - - - diff --git a/libfuse/doc/html/globals_type.html b/libfuse/doc/html/globals_type.html deleted file mode 100644 index 7c9ccdea..00000000 --- a/libfuse/doc/html/globals_type.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - -fuse: Globals - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - - -
-
-
- - - - diff --git a/libfuse/doc/html/index.html b/libfuse/doc/html/index.html deleted file mode 100644 index 5e240198..00000000 --- a/libfuse/doc/html/index.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - -fuse: Main Page - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - -
-
-
-
fuse Documentation
-
-
-
- - - - diff --git a/libfuse/doc/html/nav_f.png b/libfuse/doc/html/nav_f.png deleted file mode 100644 index 72a58a529ed3a9ed6aa0c51a79cf207e026deee2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc) zn!W8uqtnIQ>_z8U diff --git a/libfuse/doc/html/nav_g.png b/libfuse/doc/html/nav_g.png deleted file mode 100644 index 2093a237a94f6c83e19ec6e5fd42f7ddabdafa81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5=67#uj90@pIL wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&vFVdQ&MBb@0HFXL1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM - - - - - -fuse: fuse_args Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_args Struct Reference
-
-
- -

#include <fuse_opt.h>

- - - - - - - - -

-Data Fields

int argc
 
char ** argv
 
int allocated
 
-

Detailed Description

-

Argument list

-

Field Documentation

- -
-
- - - - -
int fuse_args::allocated
-
-

Is 'argv' allocated?

- -
-
- -
-
- - - - -
int fuse_args::argc
-
-

Argument count

- -
-
- -
-
- - - - -
char** fuse_args::argv
-
-

Argument vector. NULL terminated

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__buf.html b/libfuse/doc/html/structfuse__buf.html deleted file mode 100644 index 65b6b5ef..00000000 --- a/libfuse/doc/html/structfuse__buf.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -fuse: fuse_buf Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_buf Struct Reference
-
-
- -

#include <fuse_common.h>

- - - - - - - - - - - - -

-Data Fields

size_t size
 
enum fuse_buf_flags flags
 
void * mem
 
int fd
 
off_t pos
 
-

Detailed Description

-

Single data buffer

-

Generic data buffer for I/O, extended attributes, etc... Data may be supplied as a memory pointer or as a file descriptor

-

Field Documentation

- -
-
- - - - -
int fuse_buf::fd
-
-

File descriptor

-

Used if FUSE_BUF_IS_FD flag is set.

- -
-
- -
-
- - - - -
enum fuse_buf_flags fuse_buf::flags
-
-

Buffer flags

- -
-
- -
-
- - - - -
void* fuse_buf::mem
-
-

Memory pointer

-

Used unless FUSE_BUF_IS_FD flag is set.

- -
-
- -
-
- - - - -
off_t fuse_buf::pos
-
-

File position

-

Used if FUSE_BUF_FD_SEEK flag is set.

- -
-
- -
-
- - - - -
size_t fuse_buf::size
-
-

Size of data in bytes

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__bufvec.html b/libfuse/doc/html/structfuse__bufvec.html deleted file mode 100644 index 66068965..00000000 --- a/libfuse/doc/html/structfuse__bufvec.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - -fuse: fuse_bufvec Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_bufvec Struct Reference
-
-
- -

#include <fuse_common.h>

- - - - - - - - - - -

-Data Fields

size_t count
 
size_t idx
 
size_t off
 
struct fuse_buf buf [1]
 
-

Detailed Description

-

Data buffer vector

-

An array of data buffers, each containing a memory pointer or a file descriptor.

-

Allocate dynamically to add more than one buffer.

-

Field Documentation

- -
-
- - - - -
struct fuse_buf fuse_bufvec::buf[1]
-
-

Array of buffers

- -
-
- -
-
- - - - -
size_t fuse_bufvec::count
-
-

Number of buffers in the array

- -
-
- -
-
- - - - -
size_t fuse_bufvec::idx
-
-

Index of current buffer within the array

- -
-
- -
-
- - - - -
size_t fuse_bufvec::off
-
-

Current offset within the current buffer

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__chan__ops.html b/libfuse/doc/html/structfuse__chan__ops.html deleted file mode 100644 index 6a1bc3bf..00000000 --- a/libfuse/doc/html/structfuse__chan__ops.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - -fuse: fuse_chan_ops Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_chan_ops Struct Reference
-
-
- -

#include <fuse_lowlevel.h>

- - - - - - - - -

-Data Fields

int(* receive )(struct fuse_chan **chp, char *buf, size_t size)
 
int(* send )(struct fuse_chan *ch, const struct iovec iov[], size_t count)
 
void(* destroy )(struct fuse_chan *ch)
 
-

Detailed Description

-

Channel operations

-

This is used in channel creation

-

Field Documentation

- -
-
- - - - -
void(* fuse_chan_ops::destroy)(struct fuse_chan *ch)
-
-

Destroy the channel

-
Parameters
- - -
chthe channel
-
-
- -
-
- -
-
- - - - -
int(* fuse_chan_ops::receive)(struct fuse_chan **chp, char *buf, size_t size)
-
-

Hook for receiving a raw request

-
Parameters
- - - - -
chpointer to the channel
bufthe buffer to store the request in
sizethe size of the buffer
-
-
-
Returns
the actual size of the raw request, or -1 on error
- -
-
- -
-
- - - - -
int(* fuse_chan_ops::send)(struct fuse_chan *ch, const struct iovec iov[], size_t count)
-
-

Hook for sending a raw reply

-

A return value of -ENOENT means, that the request was interrupted, and the reply was discarded

-
Parameters
- - - - -
chthe channel
iovvector of blocks
countthe number of blocks in vector
-
-
-
Returns
zero on success, -errno on failure
- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__conn__info.html b/libfuse/doc/html/structfuse__conn__info.html deleted file mode 100644 index 1f074052..00000000 --- a/libfuse/doc/html/structfuse__conn__info.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -fuse: fuse_conn_info Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_conn_info Struct Reference
-
-
- -

#include <fuse_common.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

unsigned proto_major
 
unsigned proto_minor
 
unsigned async_read
 
unsigned max_write
 
unsigned max_readahead
 
unsigned capable
 
unsigned want
 
unsigned max_background
 
unsigned congestion_threshold
 
unsigned reserved [23]
 
-

Detailed Description

-

Connection information, passed to the ->init() method

-

Some of the elements are read-write, these can be changed to indicate the value requested by the filesystem. The requested value must usually be smaller than the indicated value.

-

Field Documentation

- -
-
- - - - -
unsigned fuse_conn_info::async_read
-
-

Is asynchronous read supported (read-write)

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::capable
-
-

Capability flags, that the kernel supports

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::congestion_threshold
-
-

Kernel congestion threshold parameter

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::max_background
-
-

Maximum number of backgrounded requests

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::max_readahead
-
-

Maximum readahead

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::max_write
-
-

Maximum size of the write buffer

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::proto_major
-
-

Major version of the protocol (read-only)

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::proto_minor
-
-

Minor version of the protocol (read-only)

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::reserved[23]
-
-

For future use.

- -
-
- -
-
- - - - -
unsigned fuse_conn_info::want
-
-

Capability flags, that the filesystem wants to enable

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__context.html b/libfuse/doc/html/structfuse__context.html deleted file mode 100644 index 06ef95f8..00000000 --- a/libfuse/doc/html/structfuse__context.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -fuse: fuse_context Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_context Struct Reference
-
-
- -

#include <fuse.h>

- - - - - - - - - - - - - - -

-Data Fields

struct fuse * fuse
 
uid_t uid
 
gid_t gid
 
pid_t pid
 
void * private_data
 
mode_t umask
 
-

Detailed Description

-

Extra context that may be needed by some filesystems

-

The uid, gid and pid fields are not filled in case of a writepage operation.

-

Field Documentation

- -
-
- - - - -
struct fuse* fuse_context::fuse
-
-

Pointer to the fuse object

- -
-
- -
-
- - - - -
gid_t fuse_context::gid
-
-

Group ID of the calling process

- -
-
- -
-
- - - - -
pid_t fuse_context::pid
-
-

Thread ID of the calling process

- -
-
- -
-
- - - - -
void* fuse_context::private_data
-
-

Private filesystem data

- -
-
- -
-
- - - - -
uid_t fuse_context::uid
-
-

User ID of the calling process

- -
-
- -
-
- - - - -
mode_t fuse_context::umask
-
-

Umask of the calling process (introduced in version 2.8)

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__ctx.html b/libfuse/doc/html/structfuse__ctx.html deleted file mode 100644 index 9649fd1e..00000000 --- a/libfuse/doc/html/structfuse__ctx.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -fuse: fuse_ctx Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_ctx Struct Reference
-
-
- -

#include <fuse_lowlevel.h>

- - - - - - - - - - -

-Data Fields

uid_t uid
 
gid_t gid
 
pid_t pid
 
mode_t umask
 
-

Detailed Description

-

Additional context associated with requests

-

Field Documentation

- -
-
- - - - -
gid_t fuse_ctx::gid
-
-

Group ID of the calling process

- -
-
- -
-
- - - - -
pid_t fuse_ctx::pid
-
-

Thread ID of the calling process

- -
-
- -
-
- - - - -
uid_t fuse_ctx::uid
-
-

User ID of the calling process

- -
-
- -
-
- - - - -
mode_t fuse_ctx::umask
-
-

Umask of the calling process (introduced in version 2.8)

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__entry__param.html b/libfuse/doc/html/structfuse__entry__param.html deleted file mode 100644 index a0b2d9fd..00000000 --- a/libfuse/doc/html/structfuse__entry__param.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -fuse: fuse_entry_param Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_entry_param Struct Reference
-
-
- -

#include <fuse_lowlevel.h>

- - - - - - - - - - - - -

-Data Fields

fuse_ino_t ino
 
unsigned long generation
 
struct stat attr
 
double attr_timeout
 
double entry_timeout
 
-

Detailed Description

-

Directory entry parameters supplied to fuse_reply_entry()

-

Field Documentation

- -
-
- - - - -
struct stat fuse_entry_param::attr
-
-

Inode attributes.

-

Even if attr_timeout == 0, attr must be correct. For example, for open(), FUSE uses attr.st_size from lookup() to determine how many bytes to request. If this value is not correct, incorrect data will be returned.

- -
-
- -
-
- - - - -
double fuse_entry_param::attr_timeout
-
-

Validity timeout (in seconds) for the attributes

- -
-
- -
-
- - - - -
double fuse_entry_param::entry_timeout
-
-

Validity timeout (in seconds) for the name

- -
-
- -
-
- - - - -
unsigned long fuse_entry_param::generation
-
-

Generation number for this entry.

-

If the file system will be exported over NFS, the ino/generation pairs need to be unique over the file system's lifetime (rather than just the mount time). So if the file system reuses an inode after it has been deleted, it must assign a new, previously unused generation number to the inode at the same time.

-

The generation must be non-zero, otherwise FUSE will treat it as an error.

- -
-
- -
-
- - - - -
fuse_ino_t fuse_entry_param::ino
-
-

Unique inode number

-

In lookup, zero means negative entry (from version 2.5) Returning ENOENT also means negative entry, but by setting zero ino the kernel may cache negative entries for entry_timeout seconds.

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__file__info.html b/libfuse/doc/html/structfuse__file__info.html deleted file mode 100644 index 868738ab..00000000 --- a/libfuse/doc/html/structfuse__file__info.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -fuse: fuse_file_info Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_file_info Struct Reference
-
-
- -

#include <fuse_common.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

int flags
 
unsigned long fh_old
 
int writepage
 
unsigned int direct_io: 1
 
unsigned int keep_cache: 1
 
unsigned int flush: 1
 
unsigned int nonseekable: 1
 
unsigned int padding: 27
 
uint64_t fh
 
uint64_t lock_owner
 
-

Detailed Description

-

Information about open files

-

Changed in version 2.5

-

Field Documentation

- -
-
- - - - -
unsigned int fuse_file_info::direct_io
-
-

Can be filled in by open, to use direct I/O on this file. Introduced in version 2.4

- -
-
- -
-
- - - - -
uint64_t fuse_file_info::fh
-
-

File handle. May be filled in by filesystem in open(). Available in all other file operations

- -
-
- -
-
- - - - -
unsigned long fuse_file_info::fh_old
-
-

Old file handle, don't use

- -
-
- -
-
- - - - -
int fuse_file_info::flags
-
-

Open flags. Available in open() and release()

- -
-
- -
-
- - - - -
unsigned int fuse_file_info::flush
-
-

Indicates a flush operation. Set in flush operation, also maybe set in highlevel lock operation and lowlevel release operation. Introduced in version 2.6

- -
-
- -
-
- - - - -
unsigned int fuse_file_info::keep_cache
-
-

Can be filled in by open, to indicate, that cached file data need not be invalidated. Introduced in version 2.4

- -
-
- -
-
- - - - -
uint64_t fuse_file_info::lock_owner
-
-

Lock owner id. Available in locking operations and flush

- -
-
- -
-
- - - - -
unsigned int fuse_file_info::nonseekable
-
-

Can be filled in by open, to indicate that the file is not seekable. Introduced in version 2.8

- -
-
- -
-
- - - - -
unsigned int fuse_file_info::padding
-
-

Padding. Do not use

- -
-
- -
-
- - - - -
int fuse_file_info::writepage
-
-

In case of a write operation indicates if this was caused by a writepage

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__lowlevel__ops.html b/libfuse/doc/html/structfuse__lowlevel__ops.html deleted file mode 100644 index 40c4c147..00000000 --- a/libfuse/doc/html/structfuse__lowlevel__ops.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - -fuse: fuse_lowlevel_ops Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_lowlevel_ops Struct Reference
-
-
- -

#include <fuse_lowlevel.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

void(* init )(void *userdata, struct fuse_conn_info *conn)
 
void(* destroy )(void *userdata)
 
void(* lookup )(fuse_req_t req, fuse_ino_t parent, const char *name)
 
void(* forget )(fuse_req_t req, fuse_ino_t ino, unsigned long nlookup)
 
void(* getattr )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* setattr )(fuse_req_t req, fuse_ino_t ino, struct stat *attr, int to_set, struct fuse_file_info *fi)
 
void(* readlink )(fuse_req_t req, fuse_ino_t ino)
 
void(* mknod )(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, dev_t rdev)
 
void(* mkdir )(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode)
 
void(* unlink )(fuse_req_t req, fuse_ino_t parent, const char *name)
 
void(* rmdir )(fuse_req_t req, fuse_ino_t parent, const char *name)
 
void(* symlink )(fuse_req_t req, const char *link, fuse_ino_t parent, const char *name)
 
void(* rename )(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname)
 
void(* link )(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, const char *newname)
 
void(* open )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* read )(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
void(* write )(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t size, off_t off, struct fuse_file_info *fi)
 
void(* flush )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* release )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* fsync )(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
 
void(* opendir )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* readdir )(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
void(* releasedir )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
void(* fsyncdir )(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
 
void(* statfs )(fuse_req_t req, fuse_ino_t ino)
 
void(* setxattr )(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags)
 
void(* getxattr )(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
 
void(* listxattr )(fuse_req_t req, fuse_ino_t ino, size_t size)
 
void(* removexattr )(fuse_req_t req, fuse_ino_t ino, const char *name)
 
void(* access )(fuse_req_t req, fuse_ino_t ino, int mask)
 
void(* create )(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, struct fuse_file_info *fi)
 
void(* getlk )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock)
 
void(* setlk )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock, int sleep)
 
void(* bmap )(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t idx)
 
void(* ioctl )(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, struct fuse_file_info *fi, unsigned flags, const void *in_buf, size_t in_bufsz, size_t out_bufsz)
 
void(* poll )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct fuse_pollhandle *ph)
 
void(* write_buf )(fuse_req_t req, fuse_ino_t ino, struct fuse_bufvec *bufv, off_t off, struct fuse_file_info *fi)
 
void(* retrieve_reply )(fuse_req_t req, void *cookie, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv)
 
void(* forget_multi )(fuse_req_t req, size_t count, struct fuse_forget_data *forgets)
 
void(* flock )(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, int op)
 
void(* fallocate )(fuse_req_t req, fuse_ino_t ino, int mode, off_t offset, off_t length, struct fuse_file_info *fi)
 
-

Detailed Description

-

Low level filesystem operations

-

Most of the methods (with the exception of init and destroy) receive a request handle (fuse_req_t) as their first argument. This handle must be passed to one of the specified reply functions.

-

This may be done inside the method invocation, or after the call has returned. The request handle is valid until one of the reply functions is called.

-

Other pointer arguments (name, fuse_file_info, etc) are not valid after the call has returned, so if they are needed later, their contents have to be copied.

-

The filesystem sometimes needs to handle a return value of -ENOENT from the reply function, which means, that the request was interrupted, and the reply discarded. For example if fuse_reply_open() return -ENOENT means, that the release method for this file will not be called.

-

Field Documentation

- -
-
- - - - -
void(* fuse_lowlevel_ops::access)(fuse_req_t req, fuse_ino_t ino, int mask)
-
-

Check file access permissions

-

This will be called for the access() system call. If the 'default_permissions' mount option is given, this method is not called.

-

This method is not called under Linux kernel versions 2.4.x

-

Introduced in version 2.5

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
maskrequested access mode
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::bmap)(fuse_req_t req, fuse_ino_t ino, size_t blocksize, uint64_t idx)
-
-

Map block index within file to block index within device

-

Note: This makes sense only for block device backed filesystems mounted with the 'blkdev' option

-

Introduced in version 2.6

-

Valid replies: fuse_reply_bmap fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
blocksizeunit of block index
idxblock index within file
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::create)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, struct fuse_file_info *fi)
-
-

Create and open a file

-

If the file does not exist, first create it with the specified mode, and then open it.

-

Open flags (with the exception of O_NOCTTY) are available in fi->flags.

-

Filesystem may store an arbitrary file handle (pointer, index, etc) in fi->fh, and use this in other all other file operations (read, write, flush, release, fsync).

-

There are also some flags (direct_io, keep_cache) which the filesystem may set in fi, to change the way the file is opened. See fuse_file_info structure in <fuse_common.h> for more details.

-

If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the mknod() and open() methods will be called instead.

-

Introduced in version 2.5

-

Valid replies: fuse_reply_create fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
parentinode number of the parent directory
nameto create
modefile type and mode with which to create the new file
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::destroy)(void *userdata)
-
-

Clean up filesystem

-

Called on filesystem exit

-

There's no reply to this function

-
Parameters
- - -
userdatathe user data passed to fuse_lowlevel_new()
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::fallocate)(fuse_req_t req, fuse_ino_t ino, int mode, off_t offset, off_t length, struct fuse_file_info *fi)
-
-

Allocate requested space. If this function returns success then subsequent writes to the specified range shall not fail due to the lack of free space on the file system storage media.

-

Introduced in version 2.9

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
offsetstarting point for allocated region
lengthsize of allocated region
modedetermines the operation to be performed on the given range, see fallocate(2)
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::flock)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, int op)
-
-

Acquire, modify or release a BSD file lock

-

Note: if the locking methods are not implemented, the kernel will still allow file locking to work locally. Hence these are only interesting for network filesystems and similar.

-

Introduced in version 2.9

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
fifile information
opthe locking operation, see flock(2)
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::flush)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Flush method

-

This is called on each close() of the opened file.

-

Since file descriptors can be duplicated (dup, dup2, fork), for one open call there may be many flush calls.

-

Filesystems shouldn't assume that flush will always be called after some writes, or that if will be called at all.

-

fi->fh will contain the value set by the open method, or will be undefined if the open method didn't set any value.

-

NOTE: the name of the method is misleading, since (unlike fsync) the filesystem is not forced to flush pending writes. One reason to flush data, is if the filesystem wants to return write errors.

-

If the filesystem supports file locking operations (setlk, getlk) it should remove all locks belonging to 'fi->owner'.

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::forget)(fuse_req_t req, fuse_ino_t ino, unsigned long nlookup)
-
-

Forget about an inode

-

This function is called when the kernel removes an inode from its internal caches.

-

The inode's lookup count increases by one for every call to fuse_reply_entry and fuse_reply_create. The nlookup parameter indicates by how much the lookup count should be decreased.

-

Inodes with a non-zero lookup count may receive request from the kernel even after calls to unlink, rmdir or (when overwriting an existing file) rename. Filesystems must handle such requests properly and it is recommended to defer removal of the inode until the lookup count reaches zero. Calls to unlink, remdir or rename will be followed closely by forget unless the file or directory is open, in which case the kernel issues forget only after the release or releasedir calls.

-

Note that if a file system will be exported over NFS the inodes lifetime must extend even beyond forget. See the generation field in struct fuse_entry_param above.

-

On unmount the lookup count for all inodes implicitly drops to zero. It is not guaranteed that the file system will receive corresponding forget messages for the affected inodes.

-

Valid replies: fuse_reply_none

-
Parameters
- - - - -
reqrequest handle
inothe inode number
nlookupthe number of lookups to forget
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::forget_multi)(fuse_req_t req, size_t count, struct fuse_forget_data *forgets)
-
-

Forget about multiple inodes

-

See description of the forget function for more information.

-

Introduced in version 2.9

-

Valid replies: fuse_reply_none

-
Parameters
- - -
reqrequest handle
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::fsync)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
-
-

Synchronize file contents

-

If the datasync parameter is non-zero, then only the user data should be flushed, not the meta data.

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
datasyncflag indicating if only data should be flushed
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::fsyncdir)(fuse_req_t req, fuse_ino_t ino, int datasync, struct fuse_file_info *fi)
-
-

Synchronize directory contents

-

If the datasync parameter is non-zero, then only the directory contents should be flushed, not the meta data.

-

fi->fh will contain the value set by the opendir method, or will be undefined if the opendir method didn't set any value.

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
datasyncflag indicating if only data should be flushed
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::getattr)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Get file attributes

-

Valid replies: fuse_reply_attr fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifor future use, currently always NULL
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::getlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock)
-
-

Test for a POSIX file lock

-

Introduced in version 2.6

-

Valid replies: fuse_reply_lock fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
fifile information
lockthe region/type to test
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::getxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
-
-

Get an extended attribute

-

If size is zero, the size of the value should be sent with fuse_reply_xattr.

-

If the size is non-zero, and the value fits in the buffer, the value should be sent with fuse_reply_buf.

-

If the size is too small for the value, the ERANGE error should be sent.

-

Valid replies: fuse_reply_buf fuse_reply_data fuse_reply_xattr fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
nameof the extended attribute
sizemaximum size of the value to send
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::init)(void *userdata, struct fuse_conn_info *conn)
-
-

Initialize filesystem

-

Called before any other filesystem method

-

There's no reply to this function

-
Parameters
- - -
userdatathe user data passed to fuse_lowlevel_new()
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::ioctl)(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, struct fuse_file_info *fi, unsigned flags, const void *in_buf, size_t in_bufsz, size_t out_bufsz)
-
-

Ioctl

-

Note: For unrestricted ioctls (not allowed for FUSE servers), data in and out areas can be discovered by giving iovs and setting FUSE_IOCTL_RETRY in . For restricted ioctls, kernel prepares in/out data area according to the information encoded in cmd.

-

Introduced in version 2.8

-

Valid replies: fuse_reply_ioctl_retry fuse_reply_ioctl fuse_reply_ioctl_iov fuse_reply_err

-
Parameters
- - - - - - - - - - -
reqrequest handle
inothe inode number
cmdioctl command
argioctl argument
fifile information
flagsfor FUSE_IOCTL_* flags
in_bufdata fetched from the caller
in_bufsznumber of fetched bytes
out_bufszmaximum size of output data
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::link)(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, const char *newname)
-
-

Create a hard link

-

Valid replies: fuse_reply_entry fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe old inode number
newparentinode number of the new parent directory
newnamenew name to create
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::listxattr)(fuse_req_t req, fuse_ino_t ino, size_t size)
-
-

List extended attribute names

-

If size is zero, the total size of the attribute list should be sent with fuse_reply_xattr.

-

If the size is non-zero, and the null character separated attribute list fits in the buffer, the list should be sent with fuse_reply_buf.

-

If the size is too small for the list, the ERANGE error should be sent.

-

Valid replies: fuse_reply_buf fuse_reply_data fuse_reply_xattr fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
sizemaximum size of the list to send
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::lookup)(fuse_req_t req, fuse_ino_t parent, const char *name)
-
-

Look up a directory entry by name and get its attributes.

-

Valid replies: fuse_reply_entry fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
parentinode number of the parent directory
namethe name to look up
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::mkdir)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode)
-
-

Create a directory

-

Valid replies: fuse_reply_entry fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
parentinode number of the parent directory
nameto create
modewith which to create the new file
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::mknod)(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode, dev_t rdev)
-
-

Create file node

-

Create a regular file, character device, block device, fifo or socket node.

-

Valid replies: fuse_reply_entry fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
parentinode number of the parent directory
nameto create
modefile type and mode with which to create the new file
rdevthe device number (only valid if created file is a device)
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::open)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Open a file

-

Open flags (with the exception of O_CREAT, O_EXCL, O_NOCTTY and O_TRUNC) are available in fi->flags.

-

Filesystem may store an arbitrary file handle (pointer, index, etc) in fi->fh, and use this in other all other file operations (read, write, flush, release, fsync).

-

Filesystem may also implement stateless file I/O and not store anything in fi->fh.

-

There are also some flags (direct_io, keep_cache) which the filesystem may set in fi, to change the way the file is opened. See fuse_file_info structure in <fuse_common.h> for more details.

-

Valid replies: fuse_reply_open fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::opendir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Open a directory

-

Filesystem may store an arbitrary file handle (pointer, index, etc) in fi->fh, and use this in other all other directory stream operations (readdir, releasedir, fsyncdir).

-

Filesystem may also implement stateless directory I/O and not store anything in fi->fh, though that makes it impossible to implement standard conforming directory stream operations in case the contents of the directory can change between opendir and releasedir.

-

Valid replies: fuse_reply_open fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::poll)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct fuse_pollhandle *ph)
-
-

Poll for IO readiness

-

Introduced in version 2.8

-

Note: If ph is non-NULL, the client should notify when IO readiness events occur by calling fuse_lowelevel_notify_poll() with the specified ph.

-

Regardless of the number of times poll with a non-NULL ph is received, single notification is enough to clear all. Notifying more times incurs overhead but doesn't harm correctness.

-

The callee is responsible for destroying ph with fuse_pollhandle_destroy() when no longer in use.

-

Valid replies: fuse_reply_poll fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
inothe inode number
fifile information
phpoll handle to be used for notification
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::read)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
-
-

Read data

-

Read should send exactly the number of bytes requested except on EOF or error, otherwise the rest of the data will be substituted with zeroes. An exception to this is when the file has been opened in 'direct_io' mode, in which case the return value of the read system call will reflect the return value of this operation.

-

fi->fh will contain the value set by the open method, or will be undefined if the open method didn't set any value.

-

Valid replies: fuse_reply_buf fuse_reply_iov fuse_reply_data fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
sizenumber of bytes to read
offoffset to read from
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::readdir)(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
-
-

Read directory

-

Send a buffer filled using fuse_add_direntry(), with size not exceeding the requested size. Send an empty buffer on end of stream.

-

fi->fh will contain the value set by the opendir method, or will be undefined if the opendir method didn't set any value.

-

Valid replies: fuse_reply_buf fuse_reply_data fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
sizemaximum number of bytes to send
offoffset to continue reading the directory stream
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::readlink)(fuse_req_t req, fuse_ino_t ino)
-
-

Read symbolic link

-

Valid replies: fuse_reply_readlink fuse_reply_err

-
Parameters
- - - -
reqrequest handle
inothe inode number
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::release)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Release an open file

-

Release is called when there are no more references to an open file: all file descriptors are closed and all memory mappings are unmapped.

-

For every open call there will be exactly one release call.

-

The filesystem may reply with an error, but error values are not returned to close() or munmap() which triggered the release.

-

fi->fh will contain the value set by the open method, or will be undefined if the open method didn't set any value. fi->flags will contain the same flags as for open.

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::releasedir)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
-
-

Release an open directory

-

For every opendir call there will be exactly one releasedir call.

-

fi->fh will contain the value set by the opendir method, or will be undefined if the opendir method didn't set any value.

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::removexattr)(fuse_req_t req, fuse_ino_t ino, const char *name)
-
-

Remove an extended attribute

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
inothe inode number
nameof the extended attribute
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::rename)(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname)
-
-

Rename a file

-

If the target exists it should be atomically replaced. If the target's inode's lookup count is non-zero, the file system is expected to postpone any removal of the inode until the lookup count reaches zero (see description of the forget function).

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
parentinode number of the old parent directory
nameold name
newparentinode number of the new parent directory
newnamenew name
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::retrieve_reply)(fuse_req_t req, void *cookie, fuse_ino_t ino, off_t offset, struct fuse_bufvec *bufv)
-
-

Callback function for the retrieve request

-

Introduced in version 2.9

-

Valid replies: fuse_reply_none

-
Parameters
- - - - - - -
reqrequest handle
cookieuser data supplied to fuse_lowlevel_notify_retrieve()
inothe inode number supplied to fuse_lowlevel_notify_retrieve()
offsetthe offset supplied to fuse_lowlevel_notify_retrieve()
bufvthe buffer containing the returned data
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::rmdir)(fuse_req_t req, fuse_ino_t parent, const char *name)
-
-

Remove a directory

-

If the directory's inode's lookup count is non-zero, the file system is expected to postpone any removal of the inode until the lookup count reaches zero (see description of the forget function).

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
parentinode number of the parent directory
nameto remove
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::setattr)(fuse_req_t req, fuse_ino_t ino, struct stat *attr, int to_set, struct fuse_file_info *fi)
-
-

Set file attributes

-

In the 'attr' argument only members indicated by the 'to_set' bitmask contain valid values. Other members contain undefined values.

-

If the setattr was invoked from the ftruncate() system call under Linux kernel versions 2.6.15 or later, the fi->fh will contain the value set by the open method or will be undefined if the open method didn't set any value. Otherwise (not ftruncate call, or kernel version earlier than 2.6.15) the fi parameter will be NULL.

-

Valid replies: fuse_reply_attr fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
attrthe attributes
to_setbit mask of attributes which should be set
fifile information, or NULL
-
-
-

Changed in version 2.5: file information filled in for ftruncate

- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::setlk)(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock, int sleep)
-
-

Acquire, modify or release a POSIX file lock

-

For POSIX threads (NPTL) there's a 1-1 relation between pid and owner, but otherwise this is not always the case. For checking lock ownership, 'fi->owner' must be used. The l_pid field in 'struct flock' should only be used to fill in this field in getlk().

-

Note: if the locking methods are not implemented, the kernel will still allow file locking to work locally. Hence these are only interesting for network filesystems and similar.

-

Introduced in version 2.6

-

Valid replies: fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
fifile information
lockthe region/type to set
sleeplocking operation may sleep
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::setxattr)(fuse_req_t req, fuse_ino_t ino, const char *name, const char *value, size_t size, int flags)
-
-

Set an extended attribute

-

Valid replies: fuse_reply_err

- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::statfs)(fuse_req_t req, fuse_ino_t ino)
-
-

Get file system statistics

-

Valid replies: fuse_reply_statfs fuse_reply_err

-
Parameters
- - - -
reqrequest handle
inothe inode number, zero means "undefined"
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::symlink)(fuse_req_t req, const char *link, fuse_ino_t parent, const char *name)
-
-

Create a symbolic link

-

Valid replies: fuse_reply_entry fuse_reply_err

-
Parameters
- - - - - -
reqrequest handle
linkthe contents of the symbolic link
parentinode number of the parent directory
nameto create
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::unlink)(fuse_req_t req, fuse_ino_t parent, const char *name)
-
-

Remove a file

-

If the file's inode's lookup count is non-zero, the file system is expected to postpone any removal of the inode until the lookup count reaches zero (see description of the forget function).

-

Valid replies: fuse_reply_err

-
Parameters
- - - - -
reqrequest handle
parentinode number of the parent directory
nameto remove
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::write)(fuse_req_t req, fuse_ino_t ino, const char *buf, size_t size, off_t off, struct fuse_file_info *fi)
-
-

Write data

-

Write should return exactly the number of bytes requested except on error. An exception to this is when the file has been opened in 'direct_io' mode, in which case the return value of the write system call will reflect the return value of this operation.

-

fi->fh will contain the value set by the open method, or will be undefined if the open method didn't set any value.

-

Valid replies: fuse_reply_write fuse_reply_err

-
Parameters
- - - - - - - -
reqrequest handle
inothe inode number
bufdata to write
sizenumber of bytes to write
offoffset to write to
fifile information
-
-
- -
-
- -
-
- - - - -
void(* fuse_lowlevel_ops::write_buf)(fuse_req_t req, fuse_ino_t ino, struct fuse_bufvec *bufv, off_t off, struct fuse_file_info *fi)
-
-

Write data made available in a buffer

-

This is a more generic version of the ->write() method. If FUSE_CAP_SPLICE_READ is set in fuse_conn_info.want and the kernel supports splicing from the fuse device, then the data will be made available in pipe for supporting zero copy data transfer.

-

buf->count is guaranteed to be one (and thus buf->idx is always zero). The write_buf handler must ensure that bufv->off is correctly updated (reflecting the number of bytes read from bufv->buf[0]).

-

Introduced in version 2.9

-

Valid replies: fuse_reply_write fuse_reply_err

-
Parameters
- - - - - - -
reqrequest handle
inothe inode number
bufvbuffer containing the data
offoffset to write to
fifile information
-
-
- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__module.html b/libfuse/doc/html/structfuse__module.html deleted file mode 100644 index 785dd345..00000000 --- a/libfuse/doc/html/structfuse__module.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - -fuse: fuse_module Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_module Struct Reference
-
-
- -

#include <fuse.h>

- - - - - - -

-Data Fields

const char * name
 
struct fuse_fs *(* factory )(struct fuse_args *args, struct fuse_fs *fs[])
 
-

Detailed Description

-

Filesystem module

-

Filesystem modules are registered with the FUSE_REGISTER_MODULE() macro.

-

If the "-omodules=modname:..." option is present, filesystem objects are created and pushed onto the stack with the 'factory' function.

-

Field Documentation

- -
-
- - - - -
struct fuse_fs*(* fuse_module::factory)(struct fuse_args *args, struct fuse_fs *fs[])
-
-

Factory for creating filesystem objects

-

The function may use and remove options from 'args' that belong to this module.

-

For now the 'fs' vector always contains exactly one filesystem. This is the filesystem which will be below the newly created filesystem in the stack.

-
Parameters
- - - -
argsthe command line arguments
fsNULL terminated filesystem object vector
-
-
-
Returns
the new filesystem object
- -
-
- -
-
- - - - -
const char* fuse_module::name
-
-

Name of filesystem

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__operations.html b/libfuse/doc/html/structfuse__operations.html deleted file mode 100644 index 1e4b7d8e..00000000 --- a/libfuse/doc/html/structfuse__operations.html +++ /dev/null @@ -1,867 +0,0 @@ - - - - - - -fuse: fuse_operations Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_operations Struct Reference
-
-
- -

#include <fuse.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

int(* getattr )(const char *, struct stat *)
 
int(* readlink )(const char *, char *, size_t)
 
int(* mknod )(const char *, mode_t, dev_t)
 
int(* mkdir )(const char *, mode_t)
 
int(* unlink )(const char *)
 
int(* rmdir )(const char *)
 
int(* symlink )(const char *, const char *)
 
int(* rename )(const char *, const char *)
 
int(* link )(const char *, const char *)
 
int(* chmod )(const char *, mode_t)
 
int(* chown )(const char *, uid_t, gid_t)
 
int(* truncate )(const char *, off_t)
 
int(* utime )(const char *, struct utimbuf *)
 
int(* open )(const char *, struct fuse_file_info *)
 
int(* read )(const char *, char *, size_t, off_t, struct fuse_file_info *)
 
int(* write )(const char *, const char *, size_t, off_t, struct fuse_file_info *)
 
int(* statfs )(const char *, struct statvfs *)
 
int(* flush )(const char *, struct fuse_file_info *)
 
int(* release )(const char *, struct fuse_file_info *)
 
int(* fsync )(const char *, int, struct fuse_file_info *)
 
int(* setxattr )(const char *, const char *, const char *, size_t, int)
 
int(* getxattr )(const char *, const char *, char *, size_t)
 
int(* listxattr )(const char *, char *, size_t)
 
int(* removexattr )(const char *, const char *)
 
int(* opendir )(const char *, struct fuse_file_info *)
 
int(* readdir )(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
 
int(* releasedir )(const char *, struct fuse_file_info *)
 
int(* fsyncdir )(const char *, int, struct fuse_file_info *)
 
void *(* init )(struct fuse_conn_info *conn)
 
void(* destroy )(void *)
 
int(* access )(const char *, int)
 
int(* create )(const char *, mode_t, struct fuse_file_info *)
 
int(* ftruncate )(const char *, off_t, struct fuse_file_info *)
 
int(* fgetattr )(const char *, struct stat *, struct fuse_file_info *)
 
int(* lock )(const char *, struct fuse_file_info *, int cmd, struct flock *)
 
int(* utimens )(const char *, const struct timespec tv[2])
 
int(* bmap )(const char *, size_t blocksize, uint64_t *idx)
 
unsigned int flag_nullpath_ok:1
 
unsigned int flag_nopath:1
 
unsigned int flag_utime_omit_ok:1
 
unsigned int flag_reserved:29
 
int(* ioctl )(const char *, int cmd, void *arg, struct fuse_file_info *, unsigned int flags, void *data)
 
int(* poll )(const char *, struct fuse_file_info *, struct fuse_pollhandle *ph, unsigned *reventsp)
 
int(* write_buf )(const char *, struct fuse_bufvec *buf, off_t off, struct fuse_file_info *)
 
int(* read_buf )(const char *, struct fuse_bufvec **bufp, size_t size, off_t off, struct fuse_file_info *)
 
int(* flock )(const char *, struct fuse_file_info *, int op)
 
int(* fallocate )(const char *, int, off_t, off_t, struct fuse_file_info *)
 
-

Detailed Description

-

The file system operations:

-

Most of these should work very similarly to the well known UNIX file system operations. A major exception is that instead of returning an error in 'errno', the operation should return the negated error value (-errno) directly.

-

All methods are optional, but some are essential for a useful filesystem (e.g. getattr). Open, flush, release, fsync, opendir, releasedir, fsyncdir, access, create, ftruncate, fgetattr, lock, init and destroy are special purpose methods, without which a full featured filesystem can still be implemented.

-

Almost all operations take a path which can be of any length.

-

Changed in fuse 2.8.0 (regardless of API version) Previously, paths were limited to a length of PATH_MAX.

-

See http://fuse.sourceforge.net/wiki/ for more information. There is also a snapshot of the relevant wiki pages in the doc/ folder.

-

Field Documentation

- -
-
- - - - -
int(* fuse_operations::access)(const char *, int)
-
-

Check file access permissions

-

This will be called for the access() system call. If the 'default_permissions' mount option is given, this method is not called.

-

This method is not called under Linux kernel versions 2.4.x

-

Introduced in version 2.5

- -
-
- -
-
- - - - -
int(* fuse_operations::bmap)(const char *, size_t blocksize, uint64_t *idx)
-
-

Map block index within file to block index within device

-

Note: This makes sense only for block device backed filesystems mounted with the 'blkdev' option

-

Introduced in version 2.6

- -
-
- -
-
- - - - -
int(* fuse_operations::chmod)(const char *, mode_t)
-
-

Change the permission bits of a file

- -
-
- -
-
- - - - -
int(* fuse_operations::chown)(const char *, uid_t, gid_t)
-
-

Change the owner and group of a file

- -
-
- -
-
- - - - -
int(* fuse_operations::create)(const char *, mode_t, struct fuse_file_info *)
-
-

Create and open a file

-

If the file does not exist, first create it with the specified mode, and then open it.

-

If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the mknod() and open() methods will be called instead.

-

Introduced in version 2.5

- -
-
- -
-
- - - - -
void(* fuse_operations::destroy)(void *)
-
-

Clean up filesystem

-

Called on filesystem exit.

-

Introduced in version 2.3

- -
-
- -
-
- - - - -
int(* fuse_operations::fallocate)(const char *, int, off_t, off_t, struct fuse_file_info *)
-
-

Allocates space for an open file

-

This function ensures that required space is allocated for specified file. If this function returns success then any subsequent write request to specified range is guaranteed not to fail because of lack of space on the file system media.

-

Introduced in version 2.9.1

- -
-
- -
-
- - - - -
int(* fuse_operations::fgetattr)(const char *, struct stat *, struct fuse_file_info *)
-
-

Get attributes from an open file

-

This method is called instead of the getattr() method if the file information is available.

-

Currently this is only called after the create() method if that is implemented (see above). Later it may be called for invocations of fstat() too.

-

Introduced in version 2.5

- -
-
- -
-
- - - - -
unsigned int fuse_operations::flag_nopath
-
-

Flag indicating that the path need not be calculated for the following operations:

-

read, write, flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate, fgetattr, lock, ioctl and poll

-

Closely related to flag_nullpath_ok, but if this flag is set then the path will not be calculaged even if the file wasn't unlinked. However the path can still be non-NULL if it needs to be calculated for some other reason.

- -
-
- -
-
- - - - -
unsigned int fuse_operations::flag_nullpath_ok
-
-

Flag indicating that the filesystem can accept a NULL path as the first argument for the following operations:

-

read, write, flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate, fgetattr, lock, ioctl and poll

-

If this flag is set these operations continue to work on unlinked files even if "-ohard_remove" option was specified.

- -
-
- -
-
- - - - -
unsigned int fuse_operations::flag_reserved
-
-

Reserved flags, don't set

- -
-
- -
-
- - - - -
unsigned int fuse_operations::flag_utime_omit_ok
-
-

Flag indicating that the filesystem accepts special UTIME_NOW and UTIME_OMIT values in its utimens operation.

- -
-
- -
-
- - - - -
int(* fuse_operations::flock)(const char *, struct fuse_file_info *, int op)
-
-

Perform BSD file locking operation

-

The op argument will be either LOCK_SH, LOCK_EX or LOCK_UN

-

Nonblocking requests will be indicated by ORing LOCK_NB to the above operations

-

For more information see the flock(2) manual page.

-

Additionally fi->owner will be set to a value unique to this open file. This same value will be supplied to ->release() when the file is released.

-

Note: if this method is not implemented, the kernel will still allow file locking to work locally. Hence it is only interesting for network filesystems and similar.

-

Introduced in version 2.9

- -
-
- -
-
- - - - -
int(* fuse_operations::flush)(const char *, struct fuse_file_info *)
-
-

Possibly flush cached data

-

BIG NOTE: This is not equivalent to fsync(). It's not a request to sync dirty data.

-

Flush is called on each close() of a file descriptor. So if a filesystem wants to return write errors in close() and the file has cached dirty data, this is a good place to write back data and return any errors. Since many applications ignore close() errors this is not always useful.

-

NOTE: The flush() method may be called more than once for each open(). This happens if more than one file descriptor refers to an opened file due to dup(), dup2() or fork() calls. It is not possible to determine if a flush is final, so each flush should be treated equally. Multiple write-flush sequences are relatively rare, so this shouldn't be a problem.

-

Filesystems shouldn't assume that flush will always be called after some writes, or that if will be called at all.

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::fsync)(const char *, int, struct fuse_file_info *)
-
-

Synchronize file contents

-

If the datasync parameter is non-zero, then only the user data should be flushed, not the meta data.

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::fsyncdir)(const char *, int, struct fuse_file_info *)
-
-

Synchronize directory contents

-

If the datasync parameter is non-zero, then only the user data should be flushed, not the meta data

-

Introduced in version 2.3

- -
-
- -
-
- - - - -
int(* fuse_operations::ftruncate)(const char *, off_t, struct fuse_file_info *)
-
-

Change the size of an open file

-

This method is called instead of the truncate() method if the truncation was invoked from an ftruncate() system call.

-

If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the truncate() method will be called instead.

-

Introduced in version 2.5

- -
-
- -
-
- - - - -
int(* fuse_operations::getattr)(const char *, struct stat *)
-
-

Get file attributes.

-

Similar to stat(). The 'st_dev' and 'st_blksize' fields are ignored. The 'st_ino' field is ignored except if the 'use_ino' mount option is given.

- -
-
- -
-
- - - - -
int(* fuse_operations::getxattr)(const char *, const char *, char *, size_t)
-
-

Get extended attributes

- -
-
- -
-
- - - - -
void*(* fuse_operations::init)(struct fuse_conn_info *conn)
-
-

Initialize filesystem

-

The return value will passed in the private_data field of fuse_context to all file operations and as a parameter to the destroy() method.

-

Introduced in version 2.3 Changed in version 2.6

- -
-
- -
-
- - - - -
int(* fuse_operations::ioctl)(const char *, int cmd, void *arg, struct fuse_file_info *, unsigned int flags, void *data)
-
-

Ioctl

-

flags will have FUSE_IOCTL_COMPAT set for 32bit ioctls in 64bit environment. The size and direction of data is determined by IOC*() decoding of cmd. For _IOC_NONE, data will be NULL, for _IOC_WRITE data is out area, for _IOC_READ in area and if both are set in/out area. In all non-NULL cases, the area is of _IOC_SIZE(cmd) bytes.

-

If flags has FUSE_IOCTL_DIR then the fuse_file_info refers to a directory file handle.

-

Introduced in version 2.8

- -
-
- -
-
- - - - -
int(* fuse_operations::link)(const char *, const char *)
-
-

Create a hard link to a file

- -
-
- -
-
- - - - -
int(* fuse_operations::listxattr)(const char *, char *, size_t)
-
-

List extended attributes

- -
-
- -
-
- - - - -
int(* fuse_operations::lock)(const char *, struct fuse_file_info *, int cmd, struct flock *)
-
-

Perform POSIX file locking operation

-

The cmd argument will be either F_GETLK, F_SETLK or F_SETLKW.

-

For the meaning of fields in 'struct flock' see the man page for fcntl(2). The l_whence field will always be set to SEEK_SET.

-

For checking lock ownership, the 'fuse_file_info->owner' argument must be used.

-

For F_GETLK operation, the library will first check currently held locks, and if a conflicting lock is found it will return information without calling this method. This ensures, that for local locks the l_pid field is correctly filled in. The results may not be accurate in case of race conditions and in the presence of hard links, but it's unlikely that an application would rely on accurate GETLK results in these cases. If a conflicting lock is not found, this method will be called, and the filesystem may fill out l_pid by a meaningful value, or it may leave this field zero.

-

For F_SETLK and F_SETLKW the l_pid field will be set to the pid of the process performing the locking operation.

-

Note: if this method is not implemented, the kernel will still allow file locking to work locally. Hence it is only interesting for network filesystems and similar.

-

Introduced in version 2.6

- -
-
- -
-
- - - - -
int(* fuse_operations::mkdir)(const char *, mode_t)
-
-

Create a directory

-

Note that the mode argument may not have the type specification bits set, i.e. S_ISDIR(mode) can be false. To obtain the correct directory type bits use mode|S_IFDIR

- -
-
- -
-
- - - - -
int(* fuse_operations::mknod)(const char *, mode_t, dev_t)
-
-

Create a file node

-

This is called for creation of all non-directory, non-symlink nodes. If the filesystem defines a create() method, then for regular files that will be called instead.

- -
-
- -
-
- - - - -
int(* fuse_operations::open)(const char *, struct fuse_file_info *)
-
-

File open operation

-

No creation (O_CREAT, O_EXCL) and by default also no truncation (O_TRUNC) flags will be passed to open(). If an application specifies O_TRUNC, fuse first calls truncate() and then open(). Only if 'atomic_o_trunc' has been specified and kernel version is 2.6.24 or later, O_TRUNC is passed on to open.

-

Unless the 'default_permissions' mount option is given, open should check if the operation is permitted for the given flags. Optionally open may also return an arbitrary filehandle in the fuse_file_info structure, which will be passed to all file operations.

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::opendir)(const char *, struct fuse_file_info *)
-
-

Open directory

-

Unless the 'default_permissions' mount option is given, this method should check if opendir is permitted for this directory. Optionally opendir may also return an arbitrary filehandle in the fuse_file_info structure, which will be passed to readdir, closedir and fsyncdir.

-

Introduced in version 2.3

- -
-
- -
-
- - - - -
int(* fuse_operations::poll)(const char *, struct fuse_file_info *, struct fuse_pollhandle *ph, unsigned *reventsp)
-
-

Poll for IO readiness events

-

Note: If ph is non-NULL, the client should notify when IO readiness events occur by calling fuse_notify_poll() with the specified ph.

-

Regardless of the number of times poll with a non-NULL ph is received, single notification is enough to clear all. Notifying more times incurs overhead but doesn't harm correctness.

-

The callee is responsible for destroying ph with fuse_pollhandle_destroy() when no longer in use.

-

Introduced in version 2.8

- -
-
- -
-
- - - - -
int(* fuse_operations::read)(const char *, char *, size_t, off_t, struct fuse_file_info *)
-
-

Read data from an open file

-

Read should return exactly the number of bytes requested except on EOF or error, otherwise the rest of the data will be substituted with zeroes. An exception to this is when the 'direct_io' mount option is specified, in which case the return value of the read system call will reflect the return value of this operation.

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::read_buf)(const char *, struct fuse_bufvec **bufp, size_t size, off_t off, struct fuse_file_info *)
-
-

Store data from an open file in a buffer

-

Similar to the read() method, but data is stored and returned in a generic buffer.

-

No actual copying of data has to take place, the source file descriptor may simply be stored in the buffer for later data transfer.

-

The buffer must be allocated dynamically and stored at the location pointed to by bufp. If the buffer contains memory regions, they too must be allocated using malloc(). The allocated memory will be freed by the caller.

-

Introduced in version 2.9

- -
-
- -
-
- - - - -
int(* fuse_operations::readdir)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)
-
-

Read directory

-

This supersedes the old getdir() interface. New applications should use this.

-

The filesystem may choose between two modes of operation:

-

1) The readdir implementation ignores the offset parameter, and passes zero to the filler function's offset. The filler function will not return '1' (unless an error happens), so the whole directory is read in a single readdir operation. This works just like the old getdir() method.

-

2) The readdir implementation keeps track of the offsets of the directory entries. It uses the offset parameter and always passes non-zero offset to the filler function. When the buffer is full (or an error happens) the filler function will return '1'.

-

Introduced in version 2.3

- -
-
- -
-
- - - - -
int(* fuse_operations::readlink)(const char *, char *, size_t)
-
-

Read the target of a symbolic link

-

The buffer should be filled with a null terminated string. The buffer size argument includes the space for the terminating null character. If the linkname is too long to fit in the buffer, it should be truncated. The return value should be 0 for success.

- -
-
- -
-
- - - - -
int(* fuse_operations::release)(const char *, struct fuse_file_info *)
-
-

Release an open file

-

Release is called when there are no more references to an open file: all file descriptors are closed and all memory mappings are unmapped.

-

For every open() call there will be exactly one release() call with the same flags and file descriptor. It is possible to have a file opened more than once, in which case only the last release will mean, that no more reads/writes will happen on the file. The return value of release is ignored.

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::releasedir)(const char *, struct fuse_file_info *)
-
-

Release directory

-

Introduced in version 2.3

- -
-
- -
-
- - - - -
int(* fuse_operations::removexattr)(const char *, const char *)
-
-

Remove extended attributes

- -
-
- -
-
- - - - -
int(* fuse_operations::rename)(const char *, const char *)
-
-

Rename a file

- -
-
- -
-
- - - - -
int(* fuse_operations::rmdir)(const char *)
-
-

Remove a directory

- -
-
- -
-
- - - - -
int(* fuse_operations::setxattr)(const char *, const char *, const char *, size_t, int)
-
-

Set extended attributes

- -
-
- -
-
- - - - -
int(* fuse_operations::statfs)(const char *, struct statvfs *)
-
-

Get file system statistics

-

The 'f_frsize', 'f_favail', 'f_fsid' and 'f_flag' fields are ignored

-

Replaced 'struct statfs' parameter with 'struct statvfs' in version 2.5

- -
-
- -
-
- - - - -
int(* fuse_operations::symlink)(const char *, const char *)
-
-

Create a symbolic link

- -
-
- -
-
- - - - -
int(* fuse_operations::truncate)(const char *, off_t)
-
-

Change the size of a file

- -
-
- -
-
- - - - -
int(* fuse_operations::unlink)(const char *)
-
-

Remove a file

- -
-
- -
-
- - - - -
int(* fuse_operations::utime)(const char *, struct utimbuf *)
-
-

Change the access and/or modification times of a file

-

Deprecated, use utimens() instead.

- -
-
- -
-
- - - - -
int(* fuse_operations::utimens)(const char *, const struct timespec tv[2])
-
-

Change the access and modification times of a file with nanosecond resolution

-

This supersedes the old utime() interface. New applications should use this.

-

See the utimensat(2) man page for details.

-

Introduced in version 2.6

- -
-
- -
-
- - - - -
int(* fuse_operations::write)(const char *, const char *, size_t, off_t, struct fuse_file_info *)
-
-

Write data to an open file

-

Write should return exactly the number of bytes requested except on error. An exception to this is when the 'direct_io' mount option is specified (see read operation).

-

Changed in version 2.2

- -
-
- -
-
- - - - -
int(* fuse_operations::write_buf)(const char *, struct fuse_bufvec *buf, off_t off, struct fuse_file_info *)
-
-

Write contents of buffer to an open file

-

Similar to the write() method, but data is supplied in a generic buffer. Use fuse_buf_copy() to transfer data to the destination.

-

Introduced in version 2.9

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__opt.html b/libfuse/doc/html/structfuse__opt.html deleted file mode 100644 index a60e20fc..00000000 --- a/libfuse/doc/html/structfuse__opt.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - -fuse: fuse_opt Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_opt Struct Reference
-
-
- -

#include <fuse_opt.h>

- - - - - - - - -

-Data Fields

const char * templ
 
unsigned long offset
 
int value
 
-

Detailed Description

-

Option description

-

This structure describes a single option, and action associated with it, in case it matches.

-

More than one such match may occur, in which case the action for each match is executed.

-

There are three possible actions in case of a match:

-

i) An integer (int or unsigned) variable determined by 'offset' is set to 'value'

-

ii) The processing function is called, with 'value' as the key

-

iii) An integer (any) or string (char *) variable determined by 'offset' is set to the value of an option parameter

-

'offset' should normally be either set to

-
    -
  • 'offsetof(struct foo, member)' actions i) and iii)
  • -
  • -1 action ii)
  • -
-

The 'offsetof()' macro is defined in the <stddef.h> header.

-

The template determines which options match, and also have an effect on the action. Normally the action is either i) or ii), but if a format is present in the template, then action iii) is performed.

-

The types of templates are:

-

1) "-x", "-foo", "--foo", "--foo-bar", etc. These match only themselves. Invalid values are "--" and anything beginning with "-o"

-

2) "foo", "foo-bar", etc. These match "-ofoo", "-ofoo-bar" or the relevant option in a comma separated option list

-

3) "bar=", "--foo=", etc. These are variations of 1) and 2) which have a parameter

-

4) "bar=%s", "--foo=%lu", etc. Same matching as above but perform action iii).

-

5) "-x ", etc. Matches either "-xparam" or "-x param" as two separate arguments

-

6) "-x %s", etc. Combination of 4) and 5)

-

If the format is "%s", memory is allocated for the string unlike with scanf().

-

Field Documentation

- -
-
- - - - -
unsigned long fuse_opt::offset
-
-

Offset of variable within 'data' parameter of fuse_opt_parse() or -1

- -
-
- -
-
- - - - -
const char* fuse_opt::templ
-
-

Matching template and optional parameter formatting

- -
-
- -
-
- - - - -
int fuse_opt::value
-
-

Value to set the variable to, or to be passed as 'key' to the processing function. Ignored if template has a format

- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/structfuse__session__ops.html b/libfuse/doc/html/structfuse__session__ops.html deleted file mode 100644 index 7eb7782d..00000000 --- a/libfuse/doc/html/structfuse__session__ops.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -fuse: fuse_session_ops Struct Reference - - - - - - -
-
- - - - - - -
-
fuse -
-
-
- - - - -
-
- -
-
fuse_session_ops Struct Reference
-
-
- -

#include <fuse_lowlevel.h>

- - - - - - - - - - -

-Data Fields

void(* process )(void *data, const char *buf, size_t len, struct fuse_chan *ch)
 
void(* exit )(void *data, int val)
 
int(* exited )(void *data)
 
void(* destroy )(void *data)
 
-

Detailed Description

-

Session operations

-

This is used in session creation

-

Field Documentation

- -
-
- - - - -
void(* fuse_session_ops::destroy)(void *data)
-
-

Hook for cleaning up the channel on destroy (optional)

-
Parameters
- - -
datauser data passed to fuse_session_new()
-
-
- -
-
- -
-
- - - - -
void(* fuse_session_ops::exit)(void *data, int val)
-
-

Hook for session exit and reset (optional)

-
Parameters
- - - -
datauser data passed to fuse_session_new()
valexited status (1 - exited, 0 - not exited)
-
-
- -
-
- -
-
- - - - -
int(* fuse_session_ops::exited)(void *data)
-
-

Hook for querying the current exited status (optional)

-
Parameters
- - -
datauser data passed to fuse_session_new()
-
-
-
Returns
1 if exited, 0 if not exited
- -
-
- -
-
- - - - -
void(* fuse_session_ops::process)(void *data, const char *buf, size_t len, struct fuse_chan *ch)
-
-

Hook to process a request (mandatory)

-
Parameters
- - - - - -
datauser data passed to fuse_session_new()
bufbuffer containing the raw request
lenrequest length
chchannel on which the request was received
-
-
- -
-
-
The documentation for this struct was generated from the following file: -
- - - - diff --git a/libfuse/doc/html/sync_off.png b/libfuse/doc/html/sync_off.png deleted file mode 100644 index 3b443fc62892114406e3d399421b2a881b897acc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 853 zcmV-b1FHOqP)oT|#XixUYy%lpuf3i8{fX!o zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py; zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK& z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sTxLGlJY5nc&Re zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j* diff --git a/libfuse/doc/html/sync_on.png b/libfuse/doc/html/sync_on.png deleted file mode 100644 index e08320fb64e6fa33b573005ed6d8fe294e19db76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 845 zcmV-T1G4;yP)Y;xxyHF2B5Wzm| zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I_))aP?*T)ow&n59{}X4$3Goat zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F={P0Y^?$4t z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU# z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+ z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$Mj4Uq05 X8=0q~qBNan00000NkvXXu0mjfptF>5 diff --git a/libfuse/doc/html/tab_a.png b/libfuse/doc/html/tab_a.png deleted file mode 100644 index 3b725c41c5a527a3a3e40097077d0e206a681247..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD# z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4 diff --git a/libfuse/doc/html/tab_b.png b/libfuse/doc/html/tab_b.png deleted file mode 100644 index e2b4a8638cb3496a016eaed9e16ffc12846dea18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^ diff --git a/libfuse/doc/html/tabs.css b/libfuse/doc/html/tabs.css deleted file mode 100644 index 9cf578f2..00000000 --- a/libfuse/doc/html/tabs.css +++ /dev/null @@ -1,60 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/libfuse/doc/kernel.txt b/libfuse/doc/kernel.txt deleted file mode 100644 index 397a41ad..00000000 --- a/libfuse/doc/kernel.txt +++ /dev/null @@ -1,423 +0,0 @@ -Definitions -~~~~~~~~~~~ - -Userspace filesystem: - - A filesystem in which data and metadata are provided by an ordinary - userspace process. The filesystem can be accessed normally through - the kernel interface. - -Filesystem daemon: - - The process(es) providing the data and metadata of the filesystem. - -Non-privileged mount (or user mount): - - A userspace filesystem mounted by a non-privileged (non-root) user. - The filesystem daemon is running with the privileges of the mounting - user. NOTE: this is not the same as mounts allowed with the "user" - option in /etc/fstab, which is not discussed here. - -Filesystem connection: - - A connection between the filesystem daemon and the kernel. The - connection exists until either the daemon dies, or the filesystem is - umounted. Note that detaching (or lazy umounting) the filesystem - does _not_ break the connection, in this case it will exist until - the last reference to the filesystem is released. - -Mount owner: - - The user who does the mounting. - -User: - - The user who is performing filesystem operations. - -What is FUSE? -~~~~~~~~~~~~~ - -FUSE is a userspace filesystem framework. It consists of a kernel -module (fuse.ko), a userspace library (libfuse.*) and a mount utility -(fusermount). - -One of the most important features of FUSE is allowing secure, -non-privileged mounts. This opens up new possibilities for the use of -filesystems. A good example is sshfs: a secure network filesystem -using the sftp protocol. - -The userspace library and utilities are available from the FUSE -homepage: - - http://fuse.sourceforge.net/ - -Filesystem type -~~~~~~~~~~~~~~~ - -The filesystem type given to mount(2) can be one of the following: - -'fuse' - - This is the usual way to mount a FUSE filesystem. The first - argument of the mount system call may contain an arbitrary string, - which is not interpreted by the kernel. - -'fuseblk' - - The filesystem is block device based. The first argument of the - mount system call is interpreted as the name of the device. - -Mount options -~~~~~~~~~~~~~ - -'fd=N' - - The file descriptor to use for communication between the userspace - filesystem and the kernel. The file descriptor must have been - obtained by opening the FUSE device ('/dev/fuse'). - -'rootmode=M' - - The file mode of the filesystem's root in octal representation. - -'user_id=N' - - The numeric user id of the mount owner. - -'group_id=N' - - The numeric group id of the mount owner. - -'default_permissions' - - By default FUSE doesn't check file access permissions, the - filesystem is free to implement it's access policy or leave it to - the underlying file access mechanism (e.g. in case of network - filesystems). This option enables permission checking, restricting - access based on file mode. It is usually useful together with the - 'allow_other' mount option. - -'allow_other' - - This option overrides the security measure restricting file access - to the user mounting the filesystem. This option is by default only - allowed to root, but this restriction can be removed with a - (userspace) configuration option. - -'max_read=N' - - With this option the maximum size of read operations can be set. - The default is infinite. Note that the size of read requests is - limited anyway to 32 pages (which is 128kbyte on i386). - -'blksize=N' - - Set the block size for the filesystem. The default is 512. This - option is only valid for 'fuseblk' type mounts. - -Control filesystem -~~~~~~~~~~~~~~~~~~ - -There's a control filesystem for FUSE, which can be mounted by: - - mount -t fusectl none /sys/fs/fuse/connections - -Mounting it under the '/sys/fs/fuse/connections' directory makes it -backwards compatible with earlier versions. - -Under the fuse control filesystem each connection has a directory -named by a unique number. - -For each connection the following files exist within this directory: - - 'waiting' - - The number of requests which are waiting to be transferred to - userspace or being processed by the filesystem daemon. If there is - no filesystem activity and 'waiting' is non-zero, then the - filesystem is hung or deadlocked. - - 'abort' - - Writing anything into this file will abort the filesystem - connection. This means that all waiting requests will be aborted an - error returned for all aborted and new requests. - -Only the owner of the mount may read or write these files. - -Interrupting filesystem operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If a process issuing a FUSE filesystem request is interrupted, the -following will happen: - - 1) If the request is not yet sent to userspace AND the signal is - fatal (SIGKILL or unhandled fatal signal), then the request is - dequeued and returns immediately. - - 2) If the request is not yet sent to userspace AND the signal is not - fatal, then an 'interrupted' flag is set for the request. When - the request has been successfully transferred to userspace and - this flag is set, an INTERRUPT request is queued. - - 3) If the request is already sent to userspace, then an INTERRUPT - request is queued. - -INTERRUPT requests take precedence over other requests, so the -userspace filesystem will receive queued INTERRUPTs before any others. - -The userspace filesystem may ignore the INTERRUPT requests entirely, -or may honor them by sending a reply to the _original_ request, with -the error set to EINTR. - -It is also possible that there's a race between processing the -original request and it's INTERRUPT request. There are two possibilities: - - 1) The INTERRUPT request is processed before the original request is - processed - - 2) The INTERRUPT request is processed after the original request has - been answered - -If the filesystem cannot find the original request, it should wait for -some timeout and/or a number of new requests to arrive, after which it -should reply to the INTERRUPT request with an EAGAIN error. In case -1) the INTERRUPT request will be requeued. In case 2) the INTERRUPT -reply will be ignored. - -Aborting a filesystem connection -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -It is possible to get into certain situations where the filesystem is -not responding. Reasons for this may be: - - a) Broken userspace filesystem implementation - - b) Network connection down - - c) Accidental deadlock - - d) Malicious deadlock - -(For more on c) and d) see later sections) - -In either of these cases it may be useful to abort the connection to -the filesystem. There are several ways to do this: - - - Kill the filesystem daemon. Works in case of a) and b) - - - Kill the filesystem daemon and all users of the filesystem. Works - in all cases except some malicious deadlocks - - - Use forced umount (umount -f). Works in all cases but only if - filesystem is still attached (it hasn't been lazy unmounted) - - - Abort filesystem through the FUSE control filesystem. Most - powerful method, always works. - -How do non-privileged mounts work? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Since the mount() system call is a privileged operation, a helper -program (fusermount) is needed, which is installed setuid root. - -The implication of providing non-privileged mounts is that the mount -owner must not be able to use this capability to compromise the -system. Obvious requirements arising from this are: - - A) mount owner should not be able to get elevated privileges with the - help of the mounted filesystem - - B) mount owner should not get illegitimate access to information from - other users' and the super user's processes - - C) mount owner should not be able to induce undesired behavior in - other users' or the super user's processes - -How are requirements fulfilled? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - A) The mount owner could gain elevated privileges by either: - - 1) creating a filesystem containing a device file, then opening - this device - - 2) creating a filesystem containing a suid or sgid application, - then executing this application - - The solution is not to allow opening device files and ignore - setuid and setgid bits when executing programs. To ensure this - fusermount always adds "nosuid" and "nodev" to the mount options - for non-privileged mounts. - - B) If another user is accessing files or directories in the - filesystem, the filesystem daemon serving requests can record the - exact sequence and timing of operations performed. This - information is otherwise inaccessible to the mount owner, so this - counts as an information leak. - - The solution to this problem will be presented in point 2) of C). - - C) There are several ways in which the mount owner can induce - undesired behavior in other users' processes, such as: - - 1) mounting a filesystem over a file or directory which the mount - owner could otherwise not be able to modify (or could only - make limited modifications). - - This is solved in fusermount, by checking the access - permissions on the mountpoint and only allowing the mount if - the mount owner can do unlimited modification (has write - access to the mountpoint, and mountpoint is not a "sticky" - directory) - - 2) Even if 1) is solved the mount owner can change the behavior - of other users' processes. - - i) It can slow down or indefinitely delay the execution of a - filesystem operation creating a DoS against the user or the - whole system. For example a suid application locking a - system file, and then accessing a file on the mount owner's - filesystem could be stopped, and thus causing the system - file to be locked forever. - - ii) It can present files or directories of unlimited length, or - directory structures of unlimited depth, possibly causing a - system process to eat up diskspace, memory or other - resources, again causing DoS. - - The solution to this as well as B) is not to allow processes - to access the filesystem, which could otherwise not be - monitored or manipulated by the mount owner. Since if the - mount owner can ptrace a process, it can do all of the above - without using a FUSE mount, the same criteria as used in - ptrace can be used to check if a process is allowed to access - the filesystem or not. - - Note that the ptrace check is not strictly necessary to - prevent B/2/i, it is enough to check if mount owner has enough - privilege to send signal to the process accessing the - filesystem, since SIGSTOP can be used to get a similar effect. - -I think these limitations are unacceptable? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If a sysadmin trusts the users enough, or can ensure through other -measures, that system processes will never enter non-privileged -mounts, it can relax the last limitation with a "user_allow_other" -config option. If this config option is set, the mounting user can -add the "allow_other" mount option which disables the check for other -users' processes. - -Kernel - userspace interface -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following diagram shows how a filesystem operation (in this -example unlink) is performed in FUSE. - -NOTE: everything in this description is greatly simplified - - | "rm /mnt/fuse/file" | FUSE filesystem daemon - | | - | | >sys_read() - | | >fuse_dev_read() - | | >request_wait() - | | [sleep on fc->waitq] - | | - | >sys_unlink() | - | >fuse_unlink() | - | [get request from | - | fc->unused_list] | - | >request_send() | - | [queue req on fc->pending] | - | [wake up fc->waitq] | [woken up] - | >request_wait_answer() | - | [sleep on req->waitq] | - | | pending] - | | [copy req to read buffer] - | | [add req to fc->processing] - | | sys_write() - | | >fuse_dev_write() - | | [look up req in fc->processing] - | | [remove from fc->processing] - | | [copy write buffer to req] - | [woken up] | [wake up req->waitq] - | | unused_list] | - | sys_unlink("/mnt/fuse/file") | - | [acquire inode semaphore | - | for "file"] | - | >fuse_unlink() | - | [sleep on req->waitq] | - | | sys_unlink("/mnt/fuse/file") - | | [acquire inode semaphore - | | for "file"] - | | *DEADLOCK* - -The solution for this is to allow the filesystem to be aborted. - -Scenario 2 - Tricky deadlock ----------------------------- - -This one needs a carefully crafted filesystem. It's a variation on -the above, only the call back to the filesystem is not explicit, -but is caused by a pagefault. - - | Kamikaze filesystem thread 1 | Kamikaze filesystem thread 2 - | | - | [fd = open("/mnt/fuse/file")] | [request served normally] - | [mmap fd to 'addr'] | - | [close fd] | [FLUSH triggers 'magic' flag] - | [read a byte from addr] | - | >do_page_fault() | - | [find or create page] | - | [lock page] | - | >fuse_readpage() | - | [queue READ request] | - | [sleep on req->waitq] | - | | [read request to buffer] - | | [create reply header before addr] - | | >sys_write(addr - headerlength) - | | >fuse_dev_write() - | | [look up req in fc->processing] - | | [remove from fc->processing] - | | [copy write buffer to req] - | | >do_page_fault() - | | [find or create page] - | | [lock page] - | | * DEADLOCK * - -Solution is basically the same as above. - -An additional problem is that while the write buffer is being copied -to the request, the request must not be interrupted/aborted. This is -because the destination address of the copy may not be valid after the -request has returned. - -This is solved with doing the copy atomically, and allowing abort -while the page(s) belonging to the write buffer are faulted with -get_user_pages(). The 'req->locked' flag indicates when the copy is -taking place, and abort is delayed until this flag is unset. diff --git a/libfuse/doc/mount.fuse.8 b/libfuse/doc/mount.fuse.8 deleted file mode 100644 index 88dd3f4d..00000000 --- a/libfuse/doc/mount.fuse.8 +++ /dev/null @@ -1,161 +0,0 @@ -.TH fuse "8" -.SH NAME -fuse \- format and options for the fuse file systems -.SH DESCRIPTION -FUSE (Filesystem in Userspace) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. FUSE also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations. -.SH CONFIGURATION -Some options regarding mount policy can be set in the file \fI/etc/fuse.conf\fP. Currently these options are: -.TP -\fBmount_max = NNN\fP -Set the maximum number of FUSE mounts allowed to non-root users. The default is 1000. -.TP -\fBuser_allow_other\fP -Allow non-root users to specify the \fBallow_other\fP or \fBallow_root\fP mount options (see below). -.SH OPTIONS -Most of the generic mount options described in \fBmount\fP are supported (\fBro\fP, \fBrw\fP, \fBsuid\fP, \fBnosuid\fP, \fBdev\fP, \fBnodev\fP, \fBexec\fP, \fBnoexec\fP, \fBatime\fP, \fBnoatime\fP, \fBsync\fP, \fBasync\fP, \fBdirsync\fP). Filesystems are mounted with \fBnodev,nosuid\fP by default, which can only be overridden by a privileged user. -.SS "General mount options:" -These are FUSE specific mount options that can be specified for all filesystems: -.TP -\fBdefault_permissions\fP -By default FUSE doesn't check file access permissions, the filesystem is free to implement it's access policy or leave it to the underlying file access mechanism (e.g. in case of network filesystems). This option enables permission checking, restricting access based on file mode. This is option is usually useful together with the \fBallow_other\fP mount option. -.TP -\fBallow_other\fP -This option overrides the security measure restricting file access to the user mounting the filesystem. So all users (including root) can access the files. This option is by default only allowed to root, but this restriction can be removed with a configuration option described in the previous section. -.TP -\fBallow_root\fP -This option is similar to \fBallow_other\fP but file access is limited to the user mounting the filesystem and root. This option and \fBallow_other\fP are mutually exclusive. -.TP -\fBkernel_cache\fP -This option disables flushing the cache of the file contents on every \fBopen\fP(2). This should only be enabled on filesystems, where the file data is never changed externally (not through the mounted FUSE filesystem). Thus it is not suitable for network filesystems and other \fIintermediate\fP filesystems. - -\fBNOTE\fP: if this option is not specified (and neither \fBdirect_io\fP) data is still cached after the \fBopen\fP(2), so a \fBread\fP(2) system call will not always initiate a read operation. -.TP -\fBauto_cache\fP -This option enables automatic flushing of the data cache on \fBopen\fP(2). The cache will only be flushed if the modification time or the size of the file has changed. -.TP -\fBlarge_read\fP -Issue large read requests. This can improve performance for some filesystems, but can also degrade performance. This option is only useful on 2.4.X kernels, as on 2.6 kernels requests size is automatically determined for optimum performance. -.TP -\fBdirect_io\fP -This option disables the use of page cache (file content cache) in the kernel for this filesystem. This has several affects: -.IP 1. -Each \fBread\fP(2) or \fBwrite\fP(2) system call will initiate one or more read or write operations, data will not be cached in the kernel. -.IP 2. -The return value of the read() and write() system calls will correspond to the return values of the read and write operations. This is useful for example if the file size is not known in advance (before reading it). -.TP -\fBmax_read=N\fP -With this option the maximum size of read operations can be set. The default is infinite. Note that the size of read requests is limited anyway to 32 pages (which is 128kbyte on i386). -.TP -\fBmax_readahead=N\fN -Set the maximum number of bytes to read-ahead. The default is determined by the kernel. On linux-2.6.22 or earlier it's 131072 (128kbytes) -.TP -\fBmax_write=N\fP -Set the maximum number of bytes in a single write operation. The default is 128kbytes. Note, that due to various limitations, the size of write requests can be much smaller (4kbytes). This limitation will be removed in the future. -.TP -\fBasync_read\fP -Perform reads asynchronously. This is the default -.TP -\fBsync_read\fP -Perform all reads (even read-ahead) synchronously. -.TP -\fBhard_remove\fP -The default behavior is that if an open file is deleted, the file is renamed to a hidden file (\fB.fuse_hiddenXXX\fP), and only removed when the file is finally released. This relieves the filesystem implementation of having to deal with this problem. This option disables the hiding behavior, and files are removed immediately in an unlink operation (or in a rename operation which overwrites an existing file). - -It is recommended that you not use the hard_remove option. When hard_remove is set, the following libc functions fail on unlinked files (returning errno of \fBENOENT\fP): \fBread\fP(2), \fBwrite\fP(2), \fBfsync\fP(2), \fBclose\fP(2), \fBf*xattr\fP(2), \fBftruncate\fP(2), \fBfstat\fP(2), \fBfchmod\fP(2), \fBfchown\fP(2) -.TP -\fBdebug\fP -Turns on debug information printing by the library. -.TP -\fBfsname=NAME\fP -Sets the filesystem source (first field in \fI/etc/mtab\fP). The default is the mount program name. -.TP -\fBsubtype=TYPE\fP -Sets the filesystem type (third field in \fI/etc/mtab\fP). The default is the mount program name. If the kernel suppports it, \fI/etc/mtab\fP and \fI/proc/mounts\fP will show the filesystem type as \fBfuse.TYPE\fP - -If the kernel doesn't support subtypes, the source filed will be \fBTYPE#NAME\fP, or if \fBfsname\fP option is not specified, just \fBTYPE\fP. -.TP -\fBuse_ino\fP -Honor the \fIst_ino\fP field in kernel functions \fBgetattr()\fP and \fBfill_dir()\fP. This value is used to fill in the -\fIst_ino\fP field in the \fBstat\fP(2), \fBlstat\fP(2), \fBfstat\fP(2) functions and the \fId_ino\fP field in the \fBreaddir\fP(2) function. The filesystem does not have to guarantee uniqueness, however some applications rely on this value being unique for the whole filesystem. -.TP -\fBreaddir_ino\fP -If \fBuse_ino\fP option is not given, still try to fill in the \fId_ino\fP field in \fBreaddir\fP(2). If the name was previously looked up, and is still in the cache, the inode number found there will be used. Otherwise it will be set to \fB-1\fP. If \fBuse_ino\fP option is given, this option is ignored. -.TP -\fBnonempty\fP -Allows mounts over a non-empty file or directory. By default these mounts are rejected to prevent accidental covering up of data, which could for example prevent automatic backup. -.TP -\fBumask=M\fP -Override the permission bits in \fIst_mode\fP set by the filesystem. The resulting permission bits are the ones missing from the given umask value. The value is given in octal representation. -.TP -\fBuid=N\fP -Override the \fIst_uid\fP field set by the filesystem (N is numeric). -.TP -\fBgid=N\fP -Override the \fIst_gid\fP field set by the filesystem (N is numeric). -.TP -\fBblkdev\fP -Mount a filesystem backed by a block device. This is a privileged option. The device must be specified with the \fBfsname=NAME\fP option. -.TP -\fBentry_timeout=T\fP -The timeout in seconds for which name lookups will be cached. The default is 1.0 second. For all the timeout options, it is possible to give fractions of a second as well (e.g. \fBentry_timeout=2.8\fP) -.TP -\fBnegative_timeout=T\fP -The timeout in seconds for which a negative lookup will be cached. This means, that if file did not exist (lookup retuned \fBENOENT\fP), the lookup will only be redone after the timeout, and the file/directory will be assumed to not exist until then. The default is 0.0 second, meaning that caching negative lookups are disabled. -.TP -\fBattr_timeout=T\fP -The timeout in seconds for which file/directory attributes are cached. The default is 1.0 second. -.TP -\fBac_attr_timeout=T\fP -The timeout in seconds for which file attributes are cached for the purpose of checking if \fBauto_cache\fP should flush the file data on open. The default is the value of \fBattr_timeout\fP -.TP -\fBintr\fP -Allow requests to be interrupted. Turning on this option may result in unexpected behavior, if the filesystem does not support request interruption. -.TP -\fBintr_signal=NUM\fP -Specify which signal number to send to the filesystem when a request is interrupted. The default is hardcoded to USR1. -.TP -\fBmodules=M1[:M2...]\fP -Add modules to the filesystem stack. Modules are pushed in the order they are specified, with the original filesystem being on the bottom of the stack. -.SH FUSE MODULES (STACKING) -Modules are filesystem stacking support to high level API. Filesystem modules can be built into libfuse or loaded from shared object -.SS "iconv" -Perform file name character set conversion. Options are: -.TP -\fBfrom_code=CHARSET\fP -Character set to convert from (see \fBiconv -l\fP for a list of possible values). Default is \fBUTF-8\fP. -.TP -\fBto_code=CHARSET\fP -Character set to convert to. Default is determined by the current locale. -.SS "subdir" -Prepend a given directory to each path. Options are: -.TP -\fBsubdir=DIR\fP -Directory to prepend to all paths. This option is \fImandatory\fP. -.TP -\fBrellinks\fP -Transform absolute symlinks into relative -.TP -\fBnorellinks\fP -Do not transform absolute symlinks into relative. This is the default. -.SH SECURITY -The fusermount program is installed set-user-gid to fuse. This is done to allow users from fuse group to mount -their own filesystem implementations. -There must however be some limitations, in order to prevent Bad User from -doing nasty things. Currently those limitations are: -.IP 1. -The user can only mount on a mountpoint, for which it has write permission -.IP 2. -The mountpoint is not a sticky directory which isn't owned by the user (like \fI/tmp\fP usually is) -.IP 3. -No other user (including root) can access the contents of the mounted filesystem. -.SH NOTE -FUSE filesystems are unmounted using the \fBfusermount\fP(1) command (\fBfusermount -u mountpoint\fP). -.SH "AUTHORS" -.LP -The main author of FUSE is Miklos Szeredi . -.LP -This man page was written by Bastien Roucaries for the -Debian GNU/Linux distribution (but it may be used by others) from README file. -.SH SEE ALSO -fusermount(1) -mount(8) diff --git a/libfuse/doc/ulockmgr_server.1 b/libfuse/doc/ulockmgr_server.1 deleted file mode 100644 index 7b8ab9a0..00000000 --- a/libfuse/doc/ulockmgr_server.1 +++ /dev/null @@ -1,28 +0,0 @@ -.TH ULOCKMGR_SERVER 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)" - -.SH NAME -\fBulockmgr_server\fR \- Lock Manager Server for FUSE filesystems - -.SH SYNOPSIS -\fBulockmgr_server\fR - -.SH DESCRIPTION -Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations. -.PP -\fBulockmgr_server\fR is the Userspace Lock Manager Server for FUSE filesystems. - -.SH OPTIONS -\fBulockmgr_server\fR has no options. - -.SH SEE ALSO -\fIfusermount\fR(1), -\fImount\fR(8), -\fImount.fuse\fR(8). - -.SH HOMEPAGE -More information about ulockmgr_server and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>. - -.SH AUTHOR -FUSE was written by Miklos Szeredi <\fImiklos@szeredi.hu\fR>. -.PP -This manual page was written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>. diff --git a/libfuse/ecfd/LICENSE b/libfuse/ecfd/LICENSE new file mode 100644 index 00000000..33f3f96e --- /dev/null +++ b/libfuse/ecfd/LICENSE @@ -0,0 +1,17 @@ +/* + ISC License + + Copyright (c) 2018, Antonio SJ Musumeci + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ diff --git a/libfuse/ecfd/README.md b/libfuse/ecfd/README.md new file mode 100644 index 00000000..4131e654 --- /dev/null +++ b/libfuse/ecfd/README.md @@ -0,0 +1,16 @@ +# ecfd: embeddable C feature discovery + +This is a simple script and set of tests to help with what would traditionally be the `configure` step of most C/C++. It is intended to be simple to be embedded into a project and only depends on the C compiler and /bin/sh. + + +## USAGE + +First copy `ecfd` into your project. Next simply call the build script which will run the tests and output a `config.` style file to `stdout`. Compile errors will output to `stderr` which can be used to understand why they aren't working. + +``` +$ ./ecfd/build > include/config.h +``` + +## TESTS + +Each test is in a single module. The build script will try to compile each module and on success will execute the program. If anything is printed to `stdout` it will be appended to the `#define` printed to the build script's `stdout`. If the compilation fails nothing will be printed. Look at the tests directory for examples. diff --git a/libfuse/ecfd/build b/libfuse/ecfd/build new file mode 100755 index 00000000..873876d0 --- /dev/null +++ b/libfuse/ecfd/build @@ -0,0 +1,32 @@ +#!/bin/sh + +PWD=$(pwd) +BASEPATH="${PWD}/${0%/*}" + +CC=${CC:-cc} +OUTPUT="/dev/null" + +echo "#ifndef CONFIG_H_INCLUDED" +echo "#define CONFIG_H_INCLUDED" +echo + +IFS= +for file in "${BASEPATH}/tests/"*.c +do + binary="${file%.c}" + basename=$(basename ${binary}) + + ${CC} -o "${binary}" "${file}" 1>&2 + if [ $? -eq 0 ]; then + STDOUT=$(${binary}) + if [ "${STDOUT}" != "" ]; then + echo "#define ${basename} ${STDOUT}" + else + echo "#define ${basename}" + fi + rm -f "${binary}" + fi +done + +echo +echo "#endif" diff --git a/libfuse/ecfd/tests/HAVE_FORK.c b/libfuse/ecfd/tests/HAVE_FORK.c new file mode 100644 index 00000000..16ad1980 --- /dev/null +++ b/libfuse/ecfd/tests/HAVE_FORK.c @@ -0,0 +1,10 @@ +#include +#include + +int +main(void) +{ + (void)fork; + + return 0; +} diff --git a/libfuse/ecfd/tests/HAVE_SPLICE.c b/libfuse/ecfd/tests/HAVE_SPLICE.c new file mode 100644 index 00000000..4aec041a --- /dev/null +++ b/libfuse/ecfd/tests/HAVE_SPLICE.c @@ -0,0 +1,11 @@ +#define _GNU_SOURCE +#include + +int +main(int argc, + char *argv[]) +{ + (void)splice; + + return 0; +} diff --git a/libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c b/libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c new file mode 100644 index 00000000..5578b5eb --- /dev/null +++ b/libfuse/ecfd/tests/HAVE_STRUCT_STAT_ST_ATIM.c @@ -0,0 +1,14 @@ +#include +#include +#include + +int +main(int argc, + char *argv[]) +{ + struct stat st; + + (void)st.st_atim; + + return 0; +} diff --git a/libfuse/ecfd/tests/HAVE_UTIMENSAT.c b/libfuse/ecfd/tests/HAVE_UTIMENSAT.c new file mode 100644 index 00000000..d0da977f --- /dev/null +++ b/libfuse/ecfd/tests/HAVE_UTIMENSAT.c @@ -0,0 +1,11 @@ +#include +#include + +int +main(int argc, + char *argv[]) +{ + (void)utimensat; + + return 0; +} diff --git a/libfuse/ecfd/tests/HAVE_VMSPLICE.c b/libfuse/ecfd/tests/HAVE_VMSPLICE.c new file mode 100644 index 00000000..48765728 --- /dev/null +++ b/libfuse/ecfd/tests/HAVE_VMSPLICE.c @@ -0,0 +1,12 @@ +#define _GNU_SOURCE +#include +#include + +int +main(int argc, + char *argv[]) +{ + (void)vmsplice; + + return 0; +} diff --git a/libfuse/ecfd/tests/static_assert.h b/libfuse/ecfd/tests/static_assert.h new file mode 100644 index 00000000..1ec719f8 --- /dev/null +++ b/libfuse/ecfd/tests/static_assert.h @@ -0,0 +1,4 @@ +#pragma once + +#define STATIC_ASSERT(condition) \ + ((void)sizeof(char[1 - 2*!(condition)])) diff --git a/libfuse/example/Makefile.am b/libfuse/example/Makefile.am deleted file mode 100644 index 1c040574..00000000 --- a/libfuse/example/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -## Process this file with automake to produce Makefile.in - -AM_CPPFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT -noinst_HEADERS = fioc.h -noinst_PROGRAMS = fusexmp fusexmp_fh null hello hello_ll fioc fioclient \ - fsel fselclient cusexmp - -LDADD = ../lib/libfuse.la -fusexmp_fh_LDADD = ../lib/libfuse.la ../lib/libulockmgr.la - -fioclient_CPPFLAGS = -fioclient_LDFLAGS = -fioclient_LDADD = -fselclient_CPPFLAGS = -fselclient_LDFLAGS = -fselclient_LDADD = - diff --git a/libfuse/example/cusexmp.c b/libfuse/example/cusexmp.c deleted file mode 100644 index 01fcdf7d..00000000 --- a/libfuse/example/cusexmp.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - CUSE example: Character device in Userspace - Copyright (C) 2008-2009 SUSE Linux Products GmbH - Copyright (C) 2008-2009 Tejun Heo - - 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 -*/ - -#define FUSE_USE_VERSION 29 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "fioc.h" - -static void *cusexmp_buf; -static size_t cusexmp_size; - -static const char *usage = -"usage: cusexmp [options]\n" -"\n" -"options:\n" -" --help|-h print this help message\n" -" --maj=MAJ|-M MAJ device major number\n" -" --min=MIN|-m MIN device minor number\n" -" --name=NAME|-n NAME device name (mandatory)\n" -"\n"; - -static int cusexmp_resize(size_t new_size) -{ - void *new_buf; - - if (new_size == cusexmp_size) - return 0; - - new_buf = realloc(cusexmp_buf, new_size); - if (!new_buf && new_size) - return -ENOMEM; - - if (new_size > cusexmp_size) - memset(new_buf + cusexmp_size, 0, new_size - cusexmp_size); - - cusexmp_buf = new_buf; - cusexmp_size = new_size; - - return 0; -} - -static int cusexmp_expand(size_t new_size) -{ - if (new_size > cusexmp_size) - return cusexmp_resize(new_size); - return 0; -} - -static void cusexmp_open(fuse_req_t req, struct fuse_file_info *fi) -{ - fuse_reply_open(req, fi); -} - -static void cusexmp_read(fuse_req_t req, size_t size, off_t off, - struct fuse_file_info *fi) -{ - (void)fi; - - if (off >= cusexmp_size) - off = cusexmp_size; - if (size > cusexmp_size - off) - size = cusexmp_size - off; - - fuse_reply_buf(req, cusexmp_buf + off, size); -} - -static void cusexmp_write(fuse_req_t req, const char *buf, size_t size, - off_t off, struct fuse_file_info *fi) -{ - (void)fi; - - if (cusexmp_expand(off + size)) { - fuse_reply_err(req, ENOMEM); - return; - } - - memcpy(cusexmp_buf + off, buf, size); - fuse_reply_write(req, size); -} - -static void fioc_do_rw(fuse_req_t req, void *addr, const void *in_buf, - size_t in_bufsz, size_t out_bufsz, int is_read) -{ - const struct fioc_rw_arg *arg; - struct iovec in_iov[2], out_iov[3], iov[3]; - size_t cur_size; - - /* read in arg */ - in_iov[0].iov_base = addr; - in_iov[0].iov_len = sizeof(*arg); - if (!in_bufsz) { - fuse_reply_ioctl_retry(req, in_iov, 1, NULL, 0); - return; - } - arg = in_buf; - in_buf += sizeof(*arg); - in_bufsz -= sizeof(*arg); - - /* prepare size outputs */ - out_iov[0].iov_base = - addr + (unsigned long)&(((struct fioc_rw_arg *)0)->prev_size); - out_iov[0].iov_len = sizeof(arg->prev_size); - - out_iov[1].iov_base = - addr + (unsigned long)&(((struct fioc_rw_arg *)0)->new_size); - out_iov[1].iov_len = sizeof(arg->new_size); - - /* prepare client buf */ - if (is_read) { - out_iov[2].iov_base = arg->buf; - out_iov[2].iov_len = arg->size; - if (!out_bufsz) { - fuse_reply_ioctl_retry(req, in_iov, 1, out_iov, 3); - return; - } - } else { - in_iov[1].iov_base = arg->buf; - in_iov[1].iov_len = arg->size; - if (arg->size && !in_bufsz) { - fuse_reply_ioctl_retry(req, in_iov, 2, out_iov, 2); - return; - } - } - - /* we're all set */ - cur_size = cusexmp_size; - iov[0].iov_base = &cur_size; - iov[0].iov_len = sizeof(cur_size); - - iov[1].iov_base = &cusexmp_size; - iov[1].iov_len = sizeof(cusexmp_size); - - if (is_read) { - size_t off = arg->offset; - size_t size = arg->size; - - if (off >= cusexmp_size) - off = cusexmp_size; - if (size > cusexmp_size - off) - size = cusexmp_size - off; - - iov[2].iov_base = cusexmp_buf + off; - iov[2].iov_len = size; - fuse_reply_ioctl_iov(req, size, iov, 3); - } else { - if (cusexmp_expand(arg->offset + in_bufsz)) { - fuse_reply_err(req, ENOMEM); - return; - } - - memcpy(cusexmp_buf + arg->offset, in_buf, in_bufsz); - fuse_reply_ioctl_iov(req, in_bufsz, iov, 2); - } -} - -static void cusexmp_ioctl(fuse_req_t req, int cmd, void *arg, - struct fuse_file_info *fi, unsigned flags, - const void *in_buf, size_t in_bufsz, size_t out_bufsz) -{ - int is_read = 0; - - (void)fi; - - if (flags & FUSE_IOCTL_COMPAT) { - fuse_reply_err(req, ENOSYS); - return; - } - - switch (cmd) { - case FIOC_GET_SIZE: - if (!out_bufsz) { - struct iovec iov = { arg, sizeof(size_t) }; - - fuse_reply_ioctl_retry(req, NULL, 0, &iov, 1); - } else - fuse_reply_ioctl(req, 0, &cusexmp_size, - sizeof(cusexmp_size)); - break; - - case FIOC_SET_SIZE: - if (!in_bufsz) { - struct iovec iov = { arg, sizeof(size_t) }; - - fuse_reply_ioctl_retry(req, &iov, 1, NULL, 0); - } else { - cusexmp_resize(*(size_t *)in_buf); - fuse_reply_ioctl(req, 0, NULL, 0); - } - break; - - case FIOC_READ: - is_read = 1; - case FIOC_WRITE: - fioc_do_rw(req, arg, in_buf, in_bufsz, out_bufsz, is_read); - break; - - default: - fuse_reply_err(req, EINVAL); - } -} - -struct cusexmp_param { - unsigned major; - unsigned minor; - char *dev_name; - int is_help; -}; - -#define CUSEXMP_OPT(t, p) { t, offsetof(struct cusexmp_param, p), 1 } - -static const struct fuse_opt cusexmp_opts[] = { - CUSEXMP_OPT("-M %u", major), - CUSEXMP_OPT("--maj=%u", major), - CUSEXMP_OPT("-m %u", minor), - CUSEXMP_OPT("--min=%u", minor), - CUSEXMP_OPT("-n %s", dev_name), - CUSEXMP_OPT("--name=%s", dev_name), - FUSE_OPT_KEY("-h", 0), - FUSE_OPT_KEY("--help", 0), - FUSE_OPT_END -}; - -static int cusexmp_process_arg(void *data, const char *arg, int key, - struct fuse_args *outargs) -{ - struct cusexmp_param *param = data; - - (void)outargs; - (void)arg; - - switch (key) { - case 0: - param->is_help = 1; - fprintf(stderr, "%s", usage); - return fuse_opt_add_arg(outargs, "-ho"); - default: - return 1; - } -} - -static const struct cuse_lowlevel_ops cusexmp_clop = { - .open = cusexmp_open, - .read = cusexmp_read, - .write = cusexmp_write, - .ioctl = cusexmp_ioctl, -}; - -int main(int argc, char **argv) -{ - struct fuse_args args = FUSE_ARGS_INIT(argc, argv); - struct cusexmp_param param = { 0, 0, NULL, 0 }; - char dev_name[128] = "DEVNAME="; - const char *dev_info_argv[] = { dev_name }; - struct cuse_info ci; - - if (fuse_opt_parse(&args, ¶m, cusexmp_opts, cusexmp_process_arg)) { - printf("failed to parse option\n"); - return 1; - } - - if (!param.is_help) { - if (!param.dev_name) { - fprintf(stderr, "Error: device name missing\n"); - return 1; - } - strncat(dev_name, param.dev_name, sizeof(dev_name) - 9); - } - - memset(&ci, 0, sizeof(ci)); - ci.dev_major = param.major; - ci.dev_minor = param.minor; - ci.dev_info_argc = 1; - ci.dev_info_argv = dev_info_argv; - ci.flags = CUSE_UNRESTRICTED_IOCTL; - - return cuse_lowlevel_main(args.argc, args.argv, &ci, &cusexmp_clop, - NULL); -} diff --git a/libfuse/example/fioc.c b/libfuse/example/fioc.c deleted file mode 100644 index bee40b90..00000000 --- a/libfuse/example/fioc.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - FUSE fioc: FUSE ioctl example - Copyright (C) 2008 SUSE Linux Products GmbH - Copyright (C) 2008 Tejun Heo - - 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 -*/ - -#define FUSE_USE_VERSION 26 - -#include -#include -#include -#include -#include -#include -#include - -#include "fioc.h" - -#define FIOC_NAME "fioc" - -enum { - FIOC_NONE, - FIOC_ROOT, - FIOC_FILE, -}; - -static void *fioc_buf; -static size_t fioc_size; - -static int fioc_resize(size_t new_size) -{ - void *new_buf; - - if (new_size == fioc_size) - return 0; - - new_buf = realloc(fioc_buf, new_size); - if (!new_buf && new_size) - return -ENOMEM; - - if (new_size > fioc_size) - memset(new_buf + fioc_size, 0, new_size - fioc_size); - - fioc_buf = new_buf; - fioc_size = new_size; - - return 0; -} - -static int fioc_expand(size_t new_size) -{ - if (new_size > fioc_size) - return fioc_resize(new_size); - return 0; -} - -static int fioc_file_type(const char *path) -{ - if (strcmp(path, "/") == 0) - return FIOC_ROOT; - if (strcmp(path, "/" FIOC_NAME) == 0) - return FIOC_FILE; - return FIOC_NONE; -} - -static int fioc_getattr(const char *path, struct stat *stbuf) -{ - stbuf->st_uid = getuid(); - stbuf->st_gid = getgid(); - stbuf->st_atime = stbuf->st_mtime = time(NULL); - - switch (fioc_file_type(path)) { - case FIOC_ROOT: - stbuf->st_mode = S_IFDIR | 0755; - stbuf->st_nlink = 2; - break; - case FIOC_FILE: - stbuf->st_mode = S_IFREG | 0644; - stbuf->st_nlink = 1; - stbuf->st_size = fioc_size; - break; - case FIOC_NONE: - return -ENOENT; - } - - return 0; -} - -static int fioc_open(const char *path, struct fuse_file_info *fi) -{ - (void) fi; - - if (fioc_file_type(path) != FIOC_NONE) - return 0; - return -ENOENT; -} - -static int fioc_do_read(char *buf, size_t size, off_t offset) -{ - if (offset >= fioc_size) - return 0; - - if (size > fioc_size - offset) - size = fioc_size - offset; - - memcpy(buf, fioc_buf + offset, size); - - return size; -} - -static int fioc_read(const char *path, char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) fi; - - if (fioc_file_type(path) != FIOC_FILE) - return -EINVAL; - - return fioc_do_read(buf, size, offset); -} - -static int fioc_do_write(const char *buf, size_t size, off_t offset) -{ - if (fioc_expand(offset + size)) - return -ENOMEM; - - memcpy(fioc_buf + offset, buf, size); - - return size; -} - -static int fioc_write(const char *path, const char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) fi; - - if (fioc_file_type(path) != FIOC_FILE) - return -EINVAL; - - return fioc_do_write(buf, size, offset); -} - -static int fioc_truncate(const char *path, off_t size) -{ - if (fioc_file_type(path) != FIOC_FILE) - return -EINVAL; - - return fioc_resize(size); -} - -static int fioc_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - (void) fi; - (void) offset; - - if (fioc_file_type(path) != FIOC_ROOT) - return -ENOENT; - - filler(buf, ".", NULL, 0); - filler(buf, "..", NULL, 0); - filler(buf, FIOC_NAME, NULL, 0); - - return 0; -} - -static int fioc_ioctl(const char *path, int cmd, void *arg, - struct fuse_file_info *fi, unsigned int flags, void *data) -{ - (void) arg; - (void) fi; - (void) flags; - - if (fioc_file_type(path) != FIOC_FILE) - return -EINVAL; - - if (flags & FUSE_IOCTL_COMPAT) - return -ENOSYS; - - switch (cmd) { - case FIOC_GET_SIZE: - *(size_t *)data = fioc_size; - return 0; - - case FIOC_SET_SIZE: - fioc_resize(*(size_t *)data); - return 0; - } - - return -EINVAL; -} - -static struct fuse_operations fioc_oper = { - .getattr = fioc_getattr, - .readdir = fioc_readdir, - .truncate = fioc_truncate, - .open = fioc_open, - .read = fioc_read, - .write = fioc_write, - .ioctl = fioc_ioctl, -}; - -int main(int argc, char *argv[]) -{ - return fuse_main(argc, argv, &fioc_oper, NULL); -} diff --git a/libfuse/example/fioc.h b/libfuse/example/fioc.h deleted file mode 100644 index ec1a39dc..00000000 --- a/libfuse/example/fioc.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - FUSE-ioctl: ioctl support for FUSE - Copyright (C) 2008 SUSE Linux Products GmbH - Copyright (C) 2008 Tejun Heo - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. -*/ - -#include -#include -#include - -enum { - FIOC_GET_SIZE = _IOR('E', 0, size_t), - FIOC_SET_SIZE = _IOW('E', 1, size_t), - - /* - * The following two ioctls don't follow usual encoding rules - * and transfer variable amount of data. - */ - FIOC_READ = _IO('E', 2), - FIOC_WRITE = _IO('E', 3), -}; - -struct fioc_rw_arg { - off_t offset; - void *buf; - size_t size; - size_t prev_size; /* out param for previous total size */ - size_t new_size; /* out param for new total size */ -}; diff --git a/libfuse/example/fioclient.c b/libfuse/example/fioclient.c deleted file mode 100644 index 5f05525f..00000000 --- a/libfuse/example/fioclient.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - FUSE fioclient: FUSE ioctl example client - Copyright (C) 2008 SUSE Linux Products GmbH - Copyright (C) 2008 Tejun Heo - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. - - gcc -Wall fioclient.c -o fioclient -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "fioc.h" - -const char *usage = -"Usage: fioclient FIOC_FILE COMMAND\n" -"\n" -"COMMANDS\n" -" s [SIZE] : get size if SIZE is omitted, set size otherwise\n" -" r SIZE [OFF] : read SIZE bytes @ OFF (dfl 0) and output to stdout\n" -" w SIZE [OFF] : write SIZE bytes @ OFF (dfl 0) from stdin\n" -"\n"; - -static int do_rw(int fd, int is_read, size_t size, off_t offset, - size_t *prev_size, size_t *new_size) -{ - struct fioc_rw_arg arg = { .offset = offset }; - ssize_t ret; - - arg.buf = calloc(1, size); - if (!arg.buf) { - fprintf(stderr, "failed to allocated %zu bytes\n", size); - return -1; - } - - if (is_read) { - arg.size = size; - ret = ioctl(fd, FIOC_READ, &arg); - if (ret >= 0) - fwrite(arg.buf, 1, ret, stdout); - } else { - arg.size = fread(arg.buf, 1, size, stdin); - fprintf(stderr, "Writing %zu bytes\n", arg.size); - ret = ioctl(fd, FIOC_WRITE, &arg); - } - - if (ret >= 0) { - *prev_size = arg.prev_size; - *new_size = arg.new_size; - } else - perror("ioctl"); - - free(arg.buf); - return ret; -} - -int main(int argc, char **argv) -{ - size_t param[2] = { }; - size_t size, prev_size = 0, new_size = 0; - char cmd; - int fd, i, rc; - - if (argc < 3) - goto usage; - - fd = open(argv[1], O_RDWR); - if (fd < 0) { - perror("open"); - return 1; - } - - cmd = tolower(argv[2][0]); - argc -= 3; - argv += 3; - - for (i = 0; i < argc; i++) { - char *endp; - param[i] = strtoul(argv[i], &endp, 0); - if (endp == argv[i] || *endp != '\0') - goto usage; - } - - switch (cmd) { - case 's': - if (!argc) { - if (ioctl(fd, FIOC_GET_SIZE, &size)) { - perror("ioctl"); - return 1; - } - printf("%zu\n", size); - } else { - size = param[0]; - if (ioctl(fd, FIOC_SET_SIZE, &size)) { - perror("ioctl"); - return 1; - } - } - return 0; - - case 'r': - case 'w': - rc = do_rw(fd, cmd == 'r', param[0], param[1], - &prev_size, &new_size); - if (rc < 0) - return 1; - fprintf(stderr, "transferred %d bytes (%zu -> %zu)\n", - rc, prev_size, new_size); - return 0; - } - - usage: - fprintf(stderr, "%s", usage); - return 1; -} diff --git a/libfuse/example/fsel.c b/libfuse/example/fsel.c deleted file mode 100644 index 9cf02213..00000000 --- a/libfuse/example/fsel.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - FUSE fsel: FUSE select example - Copyright (C) 2008 SUSE Linux Products GmbH - Copyright (C) 2008 Tejun Heo - - 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 -*/ - -#define FUSE_USE_VERSION 29 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * fsel_open_mask is used to limit the number of opens to 1 per file. - * This is to use file index (0-F) as fh as poll support requires - * unique fh per open file. Lifting this would require proper open - * file management. - */ -static unsigned fsel_open_mask; -static const char fsel_hex_map[] = "0123456789ABCDEF"; -static struct fuse *fsel_fuse; /* needed for poll notification */ - -#define FSEL_CNT_MAX 10 /* each file can store upto 10 chars */ -#define FSEL_FILES 16 - -static pthread_mutex_t fsel_mutex; /* protects notify_mask and cnt array */ -static unsigned fsel_poll_notify_mask; /* poll notification scheduled? */ -static struct fuse_pollhandle *fsel_poll_handle[FSEL_FILES]; /* poll notify handles */ -static unsigned fsel_cnt[FSEL_FILES]; /* nbytes stored in each file */ - -static int fsel_path_index(const char *path) -{ - char ch = path[1]; - - if (strlen(path) != 2 || path[0] != '/' || !isxdigit(ch) || islower(ch)) - return -1; - return ch <= '9' ? ch - '0' : ch - 'A' + 10; -} - -static int fsel_getattr(const char *path, struct stat *stbuf) -{ - int idx; - - memset(stbuf, 0, sizeof(struct stat)); - - if (strcmp(path, "/") == 0) { - stbuf->st_mode = S_IFDIR | 0555; - stbuf->st_nlink = 2; - return 0; - } - - idx = fsel_path_index(path); - if (idx < 0) - return -ENOENT; - - stbuf->st_mode = S_IFREG | 0444; - stbuf->st_nlink = 1; - stbuf->st_size = fsel_cnt[idx]; - return 0; -} - -static int fsel_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - char name[2] = { }; - int i; - - (void) offset; - (void) fi; - - if (strcmp(path, "/") != 0) - return -ENOENT; - - for (i = 0; i < FSEL_FILES; i++) { - name[0] = fsel_hex_map[i]; - filler(buf, name, NULL, 0); - } - - return 0; -} - -static int fsel_open(const char *path, struct fuse_file_info *fi) -{ - int idx = fsel_path_index(path); - - if (idx < 0) - return -ENOENT; - if ((fi->flags & 3) != O_RDONLY) - return -EACCES; - if (fsel_open_mask & (1 << idx)) - return -EBUSY; - fsel_open_mask |= (1 << idx); - - /* - * fsel files are nonseekable somewhat pipe-like files which - * gets filled up periodically by producer thread and consumed - * on read. Tell FUSE as such. - */ - fi->fh = idx; - fi->direct_io = 1; - fi->nonseekable = 1; - - return 0; -} - -static int fsel_release(const char *path, struct fuse_file_info *fi) -{ - int idx = fi->fh; - - (void) path; - - fsel_open_mask &= ~(1 << idx); - return 0; -} - -static int fsel_read(const char *path, char *buf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - int idx = fi->fh; - - (void) path; - (void) offset; - - pthread_mutex_lock(&fsel_mutex); - if (fsel_cnt[idx] < size) - size = fsel_cnt[idx]; - printf("READ %X transferred=%zu cnt=%u\n", idx, size, fsel_cnt[idx]); - fsel_cnt[idx] -= size; - pthread_mutex_unlock(&fsel_mutex); - - memset(buf, fsel_hex_map[idx], size); - return size; -} - -static int fsel_poll(const char *path, struct fuse_file_info *fi, - struct fuse_pollhandle *ph, unsigned *reventsp) -{ - static unsigned polled_zero; - int idx = fi->fh; - - (void) path; - - /* - * Poll notification requires pointer to struct fuse which - * can't be obtained when using fuse_main(). As notification - * happens only after poll is called, fill it here from - * fuse_context. - */ - if (!fsel_fuse) { - struct fuse_context *cxt = fuse_get_context(); - if (cxt) - fsel_fuse = cxt->fuse; - } - - pthread_mutex_lock(&fsel_mutex); - - if (ph != NULL) { - struct fuse_pollhandle *oldph = fsel_poll_handle[idx]; - - if (oldph) - fuse_pollhandle_destroy(oldph); - - fsel_poll_notify_mask |= (1 << idx); - fsel_poll_handle[idx] = ph; - } - - if (fsel_cnt[idx]) { - *reventsp |= POLLIN; - printf("POLL %X cnt=%u polled_zero=%u\n", - idx, fsel_cnt[idx], polled_zero); - polled_zero = 0; - } else - polled_zero++; - - pthread_mutex_unlock(&fsel_mutex); - return 0; -} - -static struct fuse_operations fsel_oper = { - .getattr = fsel_getattr, - .readdir = fsel_readdir, - .open = fsel_open, - .release = fsel_release, - .read = fsel_read, - .poll = fsel_poll, -}; - -static void *fsel_producer(void *data) -{ - const struct timespec interval = { 0, 250000000 }; - unsigned idx = 0, nr = 1; - - (void) data; - - while (1) { - int i, t; - - pthread_mutex_lock(&fsel_mutex); - - /* - * This is the main producer loop which is executed - * ever 500ms. On each iteration, it fills one byte - * to 1, 2 or 4 files and sends poll notification if - * requested. - */ - for (i = 0, t = idx; i < nr; - i++, t = (t + FSEL_FILES / nr) % FSEL_FILES) { - if (fsel_cnt[t] == FSEL_CNT_MAX) - continue; - - fsel_cnt[t]++; - if (fsel_fuse && (fsel_poll_notify_mask & (1 << t))) { - struct fuse_pollhandle *ph; - - printf("NOTIFY %X\n", t); - ph = fsel_poll_handle[t]; - fuse_notify_poll(ph); - fuse_pollhandle_destroy(ph); - fsel_poll_notify_mask &= ~(1 << t); - fsel_poll_handle[t] = NULL; - } - } - - idx = (idx + 1) % FSEL_FILES; - if (idx == 0) - nr = (nr * 2) % 7; /* cycle through 1, 2 and 4 */ - - pthread_mutex_unlock(&fsel_mutex); - - nanosleep(&interval, NULL); - } - - return NULL; -} - -int main(int argc, char *argv[]) -{ - pthread_t producer; - pthread_attr_t attr; - int ret; - - errno = pthread_mutex_init(&fsel_mutex, NULL); - if (errno) { - perror("pthread_mutex_init"); - return 1; - } - - errno = pthread_attr_init(&attr); - if (errno) { - perror("pthread_attr_init"); - return 1; - } - - errno = pthread_create(&producer, &attr, fsel_producer, NULL); - if (errno) { - perror("pthread_create"); - return 1; - } - - ret = fuse_main(argc, argv, &fsel_oper, NULL); - - pthread_cancel(producer); - pthread_join(producer, NULL); - - return ret; -} diff --git a/libfuse/example/fselclient.c b/libfuse/example/fselclient.c deleted file mode 100644 index 7c4b8375..00000000 --- a/libfuse/example/fselclient.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - FUSE fselclient: FUSE select example client - Copyright (C) 2008 SUSE Linux Products GmbH - Copyright (C) 2008 Tejun Heo - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. - - gcc -Wall fselclient.c -o fselclient -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define FSEL_FILES 16 - -int main(void) -{ - static const char hex_map[FSEL_FILES] = "0123456789ABCDEF"; - int fds[FSEL_FILES]; - int i, nfds; - - for (i = 0; i < FSEL_FILES; i++) { - char name[] = { hex_map[i], '\0' }; - fds[i] = open(name, O_RDONLY); - if (fds[i] < 0) { - perror("open"); - return 1; - } - } - nfds = fds[FSEL_FILES - 1] + 1; - - while (1) { - static char buf[4096]; - fd_set rfds; - int rc; - - FD_ZERO(&rfds); - for (i = 0; i < FSEL_FILES; i++) - FD_SET(fds[i], &rfds); - - rc = select(nfds, &rfds, NULL, NULL, NULL); - - if (rc < 0) { - perror("select"); - return 1; - } - - for (i = 0; i < FSEL_FILES; i++) { - if (!FD_ISSET(fds[i], &rfds)) { - printf("_: "); - continue; - } - printf("%X:", i); - rc = read(fds[i], buf, sizeof(buf)); - if (rc < 0) { - perror("read"); - return 1; - } - printf("%02d ", rc); - } - printf("\n"); - } -} diff --git a/libfuse/example/fusexmp.c b/libfuse/example/fusexmp.c deleted file mode 100644 index dca8a467..00000000 --- a/libfuse/example/fusexmp.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi - Copyright (C) 2011 Sebastian Pipping - - 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 -*/ - -#define FUSE_USE_VERSION 26 - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef linux -/* For pread()/pwrite()/utimensat() */ -#define _XOPEN_SOURCE 700 -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SETXATTR -#include -#endif - -static int xmp_getattr(const char *path, struct stat *stbuf) -{ - int res; - - res = lstat(path, stbuf); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_access(const char *path, int mask) -{ - int res; - - res = access(path, mask); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_readlink(const char *path, char *buf, size_t size) -{ - int res; - - res = readlink(path, buf, size - 1); - if (res == -1) - return -errno; - - buf[res] = '\0'; - return 0; -} - - -static int xmp_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - DIR *dp; - struct dirent *de; - - (void) offset; - (void) fi; - - dp = opendir(path); - if (dp == NULL) - return -errno; - - while ((de = readdir(dp)) != NULL) { - struct stat st; - memset(&st, 0, sizeof(st)); - st.st_ino = de->d_ino; - st.st_mode = de->d_type << 12; - if (filler(buf, de->d_name, &st, 0)) - break; - } - - closedir(dp); - return 0; -} - -static int xmp_mknod(const char *path, mode_t mode, dev_t rdev) -{ - int res; - - /* On Linux this could just be 'mknod(path, mode, rdev)' but this - is more portable */ - if (S_ISREG(mode)) { - res = open(path, O_CREAT | O_EXCL | O_WRONLY, mode); - if (res >= 0) - res = close(res); - } else if (S_ISFIFO(mode)) - res = mkfifo(path, mode); - else - res = mknod(path, mode, rdev); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_mkdir(const char *path, mode_t mode) -{ - int res; - - res = mkdir(path, mode); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_unlink(const char *path) -{ - int res; - - res = unlink(path); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_rmdir(const char *path) -{ - int res; - - res = rmdir(path); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_symlink(const char *from, const char *to) -{ - int res; - - res = symlink(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_rename(const char *from, const char *to) -{ - int res; - - res = rename(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_link(const char *from, const char *to) -{ - int res; - - res = link(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_chmod(const char *path, mode_t mode) -{ - int res; - - res = chmod(path, mode); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_chown(const char *path, uid_t uid, gid_t gid) -{ - int res; - - res = lchown(path, uid, gid); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_truncate(const char *path, off_t size) -{ - int res; - - res = truncate(path, size); - if (res == -1) - return -errno; - - return 0; -} - -#ifdef HAVE_UTIMENSAT -static int xmp_utimens(const char *path, const struct timespec ts[2]) -{ - int res; - - /* don't use utime/utimes since they follow symlinks */ - res = utimensat(0, path, ts, AT_SYMLINK_NOFOLLOW); - if (res == -1) - return -errno; - - return 0; -} -#endif - -static int xmp_open(const char *path, struct fuse_file_info *fi) -{ - int res; - - res = open(path, fi->flags); - if (res == -1) - return -errno; - - close(res); - return 0; -} - -static int xmp_read(const char *path, char *buf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - int fd; - int res; - - (void) fi; - fd = open(path, O_RDONLY); - if (fd == -1) - return -errno; - - res = pread(fd, buf, size, offset); - if (res == -1) - res = -errno; - - close(fd); - return res; -} - -static int xmp_write(const char *path, const char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - int fd; - int res; - - (void) fi; - fd = open(path, O_WRONLY); - if (fd == -1) - return -errno; - - res = pwrite(fd, buf, size, offset); - if (res == -1) - res = -errno; - - close(fd); - return res; -} - -static int xmp_statfs(const char *path, struct statvfs *stbuf) -{ - int res; - - res = statvfs(path, stbuf); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_release(const char *path, struct fuse_file_info *fi) -{ - /* Just a stub. This method is optional and can safely be left - unimplemented */ - - (void) path; - (void) fi; - return 0; -} - -static int xmp_fsync(const char *path, int isdatasync, - struct fuse_file_info *fi) -{ - /* Just a stub. This method is optional and can safely be left - unimplemented */ - - (void) path; - (void) isdatasync; - (void) fi; - return 0; -} - -#ifdef HAVE_POSIX_FALLOCATE -static int xmp_fallocate(const char *path, int mode, - off_t offset, off_t length, struct fuse_file_info *fi) -{ - int fd; - int res; - - (void) fi; - - if (mode) - return -EOPNOTSUPP; - - fd = open(path, O_WRONLY); - if (fd == -1) - return -errno; - - res = -posix_fallocate(fd, offset, length); - - close(fd); - return res; -} -#endif - -#ifdef HAVE_SETXATTR -/* xattr operations are optional and can safely be left unimplemented */ -static int xmp_setxattr(const char *path, const char *name, const char *value, - size_t size, int flags) -{ - int res = lsetxattr(path, name, value, size, flags); - if (res == -1) - return -errno; - return 0; -} - -static int xmp_getxattr(const char *path, const char *name, char *value, - size_t size) -{ - int res = lgetxattr(path, name, value, size); - if (res == -1) - return -errno; - return res; -} - -static int xmp_listxattr(const char *path, char *list, size_t size) -{ - int res = llistxattr(path, list, size); - if (res == -1) - return -errno; - return res; -} - -static int xmp_removexattr(const char *path, const char *name) -{ - int res = lremovexattr(path, name); - if (res == -1) - return -errno; - return 0; -} -#endif /* HAVE_SETXATTR */ - -static struct fuse_operations xmp_oper = { - .getattr = xmp_getattr, - .access = xmp_access, - .readlink = xmp_readlink, - .readdir = xmp_readdir, - .mknod = xmp_mknod, - .mkdir = xmp_mkdir, - .symlink = xmp_symlink, - .unlink = xmp_unlink, - .rmdir = xmp_rmdir, - .rename = xmp_rename, - .link = xmp_link, - .chmod = xmp_chmod, - .chown = xmp_chown, - .truncate = xmp_truncate, -#ifdef HAVE_UTIMENSAT - .utimens = xmp_utimens, -#endif - .open = xmp_open, - .read = xmp_read, - .write = xmp_write, - .statfs = xmp_statfs, - .release = xmp_release, - .fsync = xmp_fsync, -#ifdef HAVE_POSIX_FALLOCATE - .fallocate = xmp_fallocate, -#endif -#ifdef HAVE_SETXATTR - .setxattr = xmp_setxattr, - .getxattr = xmp_getxattr, - .listxattr = xmp_listxattr, - .removexattr = xmp_removexattr, -#endif -}; - -int main(int argc, char *argv[]) -{ - umask(0); - return fuse_main(argc, argv, &xmp_oper, NULL); -} diff --git a/libfuse/example/fusexmp_fh.c b/libfuse/example/fusexmp_fh.c deleted file mode 100644 index 1ba9dbc8..00000000 --- a/libfuse/example/fusexmp_fh.c +++ /dev/null @@ -1,567 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi - Copyright (C) 2011 Sebastian Pipping - - 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 -*/ - -#define FUSE_USE_VERSION 26 - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SETXATTR -#include -#endif -#include /* flock(2) */ - -static int xmp_getattr(const char *path, struct stat *stbuf) -{ - int res; - - res = lstat(path, stbuf); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_fgetattr(const char *path, struct stat *stbuf, - struct fuse_file_info *fi) -{ - int res; - - (void) path; - - res = fstat(fi->fh, stbuf); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_access(const char *path, int mask) -{ - int res; - - res = access(path, mask); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_readlink(const char *path, char *buf, size_t size) -{ - int res; - - res = readlink(path, buf, size - 1); - if (res == -1) - return -errno; - - buf[res] = '\0'; - return 0; -} - -struct xmp_dirp { - DIR *dp; - struct dirent *entry; - off_t offset; -}; - -static int xmp_opendir(const char *path, struct fuse_file_info *fi) -{ - int res; - struct xmp_dirp *d = malloc(sizeof(struct xmp_dirp)); - if (d == NULL) - return -ENOMEM; - - d->dp = opendir(path); - if (d->dp == NULL) { - res = -errno; - free(d); - return res; - } - d->offset = 0; - d->entry = NULL; - - fi->fh = (unsigned long) d; - return 0; -} - -static inline struct xmp_dirp *get_dirp(struct fuse_file_info *fi) -{ - return (struct xmp_dirp *) (uintptr_t) fi->fh; -} - -static int xmp_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - struct xmp_dirp *d = get_dirp(fi); - - (void) path; - if (offset != d->offset) { - seekdir(d->dp, offset); - d->entry = NULL; - d->offset = offset; - } - while (1) { - struct stat st; - off_t nextoff; - - if (!d->entry) { - d->entry = readdir(d->dp); - if (!d->entry) - break; - } - - memset(&st, 0, sizeof(st)); - st.st_ino = d->entry->d_ino; - st.st_mode = d->entry->d_type << 12; - nextoff = telldir(d->dp); - if (filler(buf, d->entry->d_name, &st, nextoff)) - break; - - d->entry = NULL; - d->offset = nextoff; - } - - return 0; -} - -static int xmp_releasedir(const char *path, struct fuse_file_info *fi) -{ - struct xmp_dirp *d = get_dirp(fi); - (void) path; - closedir(d->dp); - free(d); - return 0; -} - -static int xmp_mknod(const char *path, mode_t mode, dev_t rdev) -{ - int res; - - if (S_ISFIFO(mode)) - res = mkfifo(path, mode); - else - res = mknod(path, mode, rdev); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_mkdir(const char *path, mode_t mode) -{ - int res; - - res = mkdir(path, mode); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_unlink(const char *path) -{ - int res; - - res = unlink(path); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_rmdir(const char *path) -{ - int res; - - res = rmdir(path); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_symlink(const char *from, const char *to) -{ - int res; - - res = symlink(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_rename(const char *from, const char *to) -{ - int res; - - res = rename(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_link(const char *from, const char *to) -{ - int res; - - res = link(from, to); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_chmod(const char *path, mode_t mode) -{ - int res; - - res = chmod(path, mode); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_chown(const char *path, uid_t uid, gid_t gid) -{ - int res; - - res = lchown(path, uid, gid); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_truncate(const char *path, off_t size) -{ - int res; - - res = truncate(path, size); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_ftruncate(const char *path, off_t size, - struct fuse_file_info *fi) -{ - int res; - - (void) path; - - res = ftruncate(fi->fh, size); - if (res == -1) - return -errno; - - return 0; -} - -#ifdef HAVE_UTIMENSAT -static int xmp_utimens(const char *path, const struct timespec ts[2]) -{ - int res; - - /* don't use utime/utimes since they follow symlinks */ - res = utimensat(0, path, ts, AT_SYMLINK_NOFOLLOW); - if (res == -1) - return -errno; - - return 0; -} -#endif - -static int xmp_create(const char *path, mode_t mode, struct fuse_file_info *fi) -{ - int fd; - - fd = open(path, fi->flags, mode); - if (fd == -1) - return -errno; - - fi->fh = fd; - return 0; -} - -static int xmp_open(const char *path, struct fuse_file_info *fi) -{ - int fd; - - fd = open(path, fi->flags); - if (fd == -1) - return -errno; - - fi->fh = fd; - return 0; -} - -static int xmp_read(const char *path, char *buf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - int res; - - (void) path; - res = pread(fi->fh, buf, size, offset); - if (res == -1) - res = -errno; - - return res; -} - -static int xmp_read_buf(const char *path, struct fuse_bufvec **bufp, - size_t size, off_t offset, struct fuse_file_info *fi) -{ - struct fuse_bufvec *src; - - (void) path; - - src = malloc(sizeof(struct fuse_bufvec)); - if (src == NULL) - return -ENOMEM; - - *src = FUSE_BUFVEC_INIT(size); - - src->buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK; - src->buf[0].fd = fi->fh; - src->buf[0].pos = offset; - - *bufp = src; - - return 0; -} - -static int xmp_write(const char *path, const char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - int res; - - (void) path; - res = pwrite(fi->fh, buf, size, offset); - if (res == -1) - res = -errno; - - return res; -} - -static int xmp_write_buf(const char *path, struct fuse_bufvec *buf, - off_t offset, struct fuse_file_info *fi) -{ - struct fuse_bufvec dst = FUSE_BUFVEC_INIT(fuse_buf_size(buf)); - - (void) path; - - dst.buf[0].flags = FUSE_BUF_IS_FD | FUSE_BUF_FD_SEEK; - dst.buf[0].fd = fi->fh; - dst.buf[0].pos = offset; - - return fuse_buf_copy(&dst, buf, FUSE_BUF_SPLICE_NONBLOCK); -} - -static int xmp_statfs(const char *path, struct statvfs *stbuf) -{ - int res; - - res = statvfs(path, stbuf); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_flush(const char *path, struct fuse_file_info *fi) -{ - int res; - - (void) path; - /* This is called from every close on an open file, so call the - close on the underlying filesystem. But since flush may be - called multiple times for an open file, this must not really - close the file. This is important if used on a network - filesystem like NFS which flush the data/metadata on close() */ - res = close(dup(fi->fh)); - if (res == -1) - return -errno; - - return 0; -} - -static int xmp_release(const char *path, struct fuse_file_info *fi) -{ - (void) path; - close(fi->fh); - - return 0; -} - -static int xmp_fsync(const char *path, int isdatasync, - struct fuse_file_info *fi) -{ - int res; - (void) path; - -#ifndef HAVE_FDATASYNC - (void) isdatasync; -#else - if (isdatasync) - res = fdatasync(fi->fh); - else -#endif - res = fsync(fi->fh); - if (res == -1) - return -errno; - - return 0; -} - -#ifdef HAVE_POSIX_FALLOCATE -static int xmp_fallocate(const char *path, int mode, - off_t offset, off_t length, struct fuse_file_info *fi) -{ - (void) path; - - if (mode) - return -EOPNOTSUPP; - - return -posix_fallocate(fi->fh, offset, length); -} -#endif - -#ifdef HAVE_SETXATTR -/* xattr operations are optional and can safely be left unimplemented */ -static int xmp_setxattr(const char *path, const char *name, const char *value, - size_t size, int flags) -{ - int res = lsetxattr(path, name, value, size, flags); - if (res == -1) - return -errno; - return 0; -} - -static int xmp_getxattr(const char *path, const char *name, char *value, - size_t size) -{ - int res = lgetxattr(path, name, value, size); - if (res == -1) - return -errno; - return res; -} - -static int xmp_listxattr(const char *path, char *list, size_t size) -{ - int res = llistxattr(path, list, size); - if (res == -1) - return -errno; - return res; -} - -static int xmp_removexattr(const char *path, const char *name) -{ - int res = lremovexattr(path, name); - if (res == -1) - return -errno; - return 0; -} -#endif /* HAVE_SETXATTR */ - -static int xmp_lock(const char *path, struct fuse_file_info *fi, int cmd, - struct flock *lock) -{ - (void) path; - - return ulockmgr_op(fi->fh, cmd, lock, &fi->lock_owner, - sizeof(fi->lock_owner)); -} - -static int xmp_flock(const char *path, struct fuse_file_info *fi, int op) -{ - int res; - (void) path; - - res = flock(fi->fh, op); - if (res == -1) - return -errno; - - return 0; -} - -static struct fuse_operations xmp_oper = { - .getattr = xmp_getattr, - .fgetattr = xmp_fgetattr, - .access = xmp_access, - .readlink = xmp_readlink, - .opendir = xmp_opendir, - .readdir = xmp_readdir, - .releasedir = xmp_releasedir, - .mknod = xmp_mknod, - .mkdir = xmp_mkdir, - .symlink = xmp_symlink, - .unlink = xmp_unlink, - .rmdir = xmp_rmdir, - .rename = xmp_rename, - .link = xmp_link, - .chmod = xmp_chmod, - .chown = xmp_chown, - .truncate = xmp_truncate, - .ftruncate = xmp_ftruncate, -#ifdef HAVE_UTIMENSAT - .utimens = xmp_utimens, -#endif - .create = xmp_create, - .open = xmp_open, - .read = xmp_read, - .read_buf = xmp_read_buf, - .write = xmp_write, - .write_buf = xmp_write_buf, - .statfs = xmp_statfs, - .flush = xmp_flush, - .release = xmp_release, - .fsync = xmp_fsync, -#ifdef HAVE_POSIX_FALLOCATE - .fallocate = xmp_fallocate, -#endif -#ifdef HAVE_SETXATTR - .setxattr = xmp_setxattr, - .getxattr = xmp_getxattr, - .listxattr = xmp_listxattr, - .removexattr = xmp_removexattr, -#endif - .lock = xmp_lock, - .flock = xmp_flock, - - .flag_nullpath_ok = 1, -#if HAVE_UTIMENSAT - .flag_utime_omit_ok = 1, -#endif -}; - -int main(int argc, char *argv[]) -{ - umask(0); - return fuse_main(argc, argv, &xmp_oper, NULL); -} diff --git a/libfuse/example/hello.c b/libfuse/example/hello.c deleted file mode 100644 index bcb6b4c5..00000000 --- a/libfuse/example/hello.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi - - 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 -*/ - -#define FUSE_USE_VERSION 26 - -#include -#include -#include -#include -#include - -static const char *hello_str = "Hello World!\n"; -static const char *hello_path = "/hello"; - -static int hello_getattr(const char *path, struct stat *stbuf) -{ - int res = 0; - - memset(stbuf, 0, sizeof(struct stat)); - if (strcmp(path, "/") == 0) { - stbuf->st_mode = S_IFDIR | 0755; - stbuf->st_nlink = 2; - } else if (strcmp(path, hello_path) == 0) { - stbuf->st_mode = S_IFREG | 0444; - stbuf->st_nlink = 1; - stbuf->st_size = strlen(hello_str); - } else - res = -ENOENT; - - return res; -} - -static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - (void) offset; - (void) fi; - - if (strcmp(path, "/") != 0) - return -ENOENT; - - filler(buf, ".", NULL, 0); - filler(buf, "..", NULL, 0); - filler(buf, hello_path + 1, NULL, 0); - - return 0; -} - -static int hello_open(const char *path, struct fuse_file_info *fi) -{ - if (strcmp(path, hello_path) != 0) - return -ENOENT; - - if ((fi->flags & 3) != O_RDONLY) - return -EACCES; - - return 0; -} - -static int hello_read(const char *path, char *buf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - size_t len; - (void) fi; - if(strcmp(path, hello_path) != 0) - return -ENOENT; - - len = strlen(hello_str); - if (offset < len) { - if (offset + size > len) - size = len - offset; - memcpy(buf, hello_str + offset, size); - } else - size = 0; - - return size; -} - -static struct fuse_operations hello_oper = { - .getattr = hello_getattr, - .readdir = hello_readdir, - .open = hello_open, - .read = hello_read, -}; - -int main(int argc, char *argv[]) -{ - return fuse_main(argc, argv, &hello_oper, NULL); -} diff --git a/libfuse/example/hello_ll.c b/libfuse/example/hello_ll.c deleted file mode 100644 index 1405441e..00000000 --- a/libfuse/example/hello_ll.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. - - gcc -Wall hello_ll.c `pkg-config fuse --cflags --libs` -o hello_ll -*/ - -#define FUSE_USE_VERSION 26 - -#include -#include -#include -#include -#include -#include -#include -#include - -static const char *hello_str = "Hello World!\n"; -static const char *hello_name = "hello"; - -static int hello_stat(fuse_ino_t ino, struct stat *stbuf) -{ - stbuf->st_ino = ino; - switch (ino) { - case 1: - stbuf->st_mode = S_IFDIR | 0755; - stbuf->st_nlink = 2; - break; - - case 2: - stbuf->st_mode = S_IFREG | 0444; - stbuf->st_nlink = 1; - stbuf->st_size = strlen(hello_str); - break; - - default: - return -1; - } - return 0; -} - -static void hello_ll_getattr(fuse_req_t req, fuse_ino_t ino, - struct fuse_file_info *fi) -{ - struct stat stbuf; - - (void) fi; - - memset(&stbuf, 0, sizeof(stbuf)); - if (hello_stat(ino, &stbuf) == -1) - fuse_reply_err(req, ENOENT); - else - fuse_reply_attr(req, &stbuf, 1.0); -} - -static void hello_ll_lookup(fuse_req_t req, fuse_ino_t parent, const char *name) -{ - struct fuse_entry_param e; - - if (parent != 1 || strcmp(name, hello_name) != 0) - fuse_reply_err(req, ENOENT); - else { - memset(&e, 0, sizeof(e)); - e.ino = 2; - e.attr_timeout = 1.0; - e.entry_timeout = 1.0; - hello_stat(e.ino, &e.attr); - - fuse_reply_entry(req, &e); - } -} - -struct dirbuf { - char *p; - size_t size; -}; - -static void dirbuf_add(fuse_req_t req, struct dirbuf *b, const char *name, - fuse_ino_t ino) -{ - struct stat stbuf; - size_t oldsize = b->size; - b->size += fuse_add_direntry(req, NULL, 0, name, NULL, 0); - b->p = (char *) realloc(b->p, b->size); - memset(&stbuf, 0, sizeof(stbuf)); - stbuf.st_ino = ino; - fuse_add_direntry(req, b->p + oldsize, b->size - oldsize, name, &stbuf, - b->size); -} - -#define min(x, y) ((x) < (y) ? (x) : (y)) - -static int reply_buf_limited(fuse_req_t req, const char *buf, size_t bufsize, - off_t off, size_t maxsize) -{ - if (off < bufsize) - return fuse_reply_buf(req, buf + off, - min(bufsize - off, maxsize)); - else - return fuse_reply_buf(req, NULL, 0); -} - -static void hello_ll_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, - off_t off, struct fuse_file_info *fi) -{ - (void) fi; - - if (ino != 1) - fuse_reply_err(req, ENOTDIR); - else { - struct dirbuf b; - - memset(&b, 0, sizeof(b)); - dirbuf_add(req, &b, ".", 1); - dirbuf_add(req, &b, "..", 1); - dirbuf_add(req, &b, hello_name, 2); - reply_buf_limited(req, b.p, b.size, off, size); - free(b.p); - } -} - -static void hello_ll_open(fuse_req_t req, fuse_ino_t ino, - struct fuse_file_info *fi) -{ - if (ino != 2) - fuse_reply_err(req, EISDIR); - else if ((fi->flags & 3) != O_RDONLY) - fuse_reply_err(req, EACCES); - else - fuse_reply_open(req, fi); -} - -static void hello_ll_read(fuse_req_t req, fuse_ino_t ino, size_t size, - off_t off, struct fuse_file_info *fi) -{ - (void) fi; - - assert(ino == 2); - reply_buf_limited(req, hello_str, strlen(hello_str), off, size); -} - -static struct fuse_lowlevel_ops hello_ll_oper = { - .lookup = hello_ll_lookup, - .getattr = hello_ll_getattr, - .readdir = hello_ll_readdir, - .open = hello_ll_open, - .read = hello_ll_read, -}; - -int main(int argc, char *argv[]) -{ - struct fuse_args args = FUSE_ARGS_INIT(argc, argv); - struct fuse_chan *ch; - char *mountpoint; - int err = -1; - - 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); - err = fuse_session_loop(se); - fuse_remove_signal_handlers(se); - fuse_session_remove_chan(ch); - } - fuse_session_destroy(se); - } - fuse_unmount(mountpoint, ch); - } - fuse_opt_free_args(&args); - - return err ? 1 : 0; -} diff --git a/libfuse/example/null.c b/libfuse/example/null.c deleted file mode 100644 index b72cf4d3..00000000 --- a/libfuse/example/null.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. - - gcc -Wall null.c `pkg-config fuse --cflags --libs` -o null -*/ - -#define FUSE_USE_VERSION 26 - -#include -#include -#include -#include -#include - -static int null_getattr(const char *path, struct stat *stbuf) -{ - if(strcmp(path, "/") != 0) - return -ENOENT; - - stbuf->st_mode = S_IFREG | 0644; - stbuf->st_nlink = 1; - stbuf->st_uid = getuid(); - stbuf->st_gid = getgid(); - stbuf->st_size = (1ULL << 32); /* 4G */ - stbuf->st_blocks = 0; - stbuf->st_atime = stbuf->st_mtime = stbuf->st_ctime = time(NULL); - - return 0; -} - -static int null_truncate(const char *path, off_t size) -{ - (void) size; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_open(const char *path, struct fuse_file_info *fi) -{ - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_read(const char *path, char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) buf; - (void) offset; - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - if (offset >= (1ULL << 32)) - return 0; - - return size; -} - -static int null_write(const char *path, const char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) buf; - (void) offset; - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return size; -} - -static struct fuse_operations null_oper = { - .getattr = null_getattr, - .truncate = null_truncate, - .open = null_open, - .read = null_read, - .write = null_write, -}; - -int main(int argc, char *argv[]) -{ - return fuse_main(argc, argv, &null_oper, NULL); -} diff --git a/libfuse/lib/mount.c b/libfuse/lib/mount.c index 227a4082..ba8fc03e 100644 --- a/libfuse/lib/mount.c +++ b/libfuse/lib/mount.c @@ -1,644 +1,24 @@ /* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2007 Miklos Szeredi + ISC License - This program can be distributed under the terms of the GNU LGPLv2. - See the file COPYING.LIB. -*/ - -#include "config.h" -#include "fuse_i.h" -#include "fuse_misc.h" -#include "fuse_opt.h" -#include "fuse_common_compat.h" -#include "mount_util.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __NetBSD__ -#include - -#define MS_RDONLY MNT_RDONLY -#define MS_NOSUID MNT_NOSUID -#define MS_NODEV MNT_NODEV -#define MS_NOEXEC MNT_NOEXEC -#define MS_SYNCHRONOUS MNT_SYNCHRONOUS -#define MS_NOATIME MNT_NOATIME - -#define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0) -#endif - -#define FUSERMOUNT_PROG "fusermount" -#define FUSE_COMMFD_ENV "_FUSE_COMMFD" - -#ifndef HAVE_FORK -#define fork() vfork() -#endif - -#ifndef MS_DIRSYNC -#define MS_DIRSYNC 128 -#endif + Copyright (c) 2019, Antonio SJ Musumeci -enum { - KEY_KERN_FLAG, - KEY_KERN_OPT, - KEY_FUSERMOUNT_OPT, - KEY_SUBTYPE_OPT, - KEY_MTAB_OPT, - KEY_ALLOW_ROOT, - KEY_RO, - KEY_HELP, - KEY_VERSION, -}; + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. -struct mount_opts { - int allow_other; - int allow_root; - int ishelp; - int flags; - int nonempty; - int auto_unmount; - int blkdev; - char *fsname; - char *subtype; - char *subtype_opt; - char *mtab_opts; - char *fusermount_opts; - char *kernel_opts; -}; - -#define FUSE_MOUNT_OPT(t, p) { t, offsetof(struct mount_opts, p), 1 } - -static const struct fuse_opt fuse_mount_opts[] = { - FUSE_MOUNT_OPT("allow_other", allow_other), - FUSE_MOUNT_OPT("allow_root", allow_root), - FUSE_MOUNT_OPT("nonempty", nonempty), - FUSE_MOUNT_OPT("blkdev", blkdev), - FUSE_MOUNT_OPT("auto_unmount", auto_unmount), - FUSE_MOUNT_OPT("fsname=%s", fsname), - FUSE_MOUNT_OPT("subtype=%s", subtype), - FUSE_OPT_KEY("allow_other", KEY_KERN_OPT), - FUSE_OPT_KEY("allow_root", KEY_ALLOW_ROOT), - FUSE_OPT_KEY("nonempty", KEY_FUSERMOUNT_OPT), - FUSE_OPT_KEY("auto_unmount", KEY_FUSERMOUNT_OPT), - FUSE_OPT_KEY("blkdev", KEY_FUSERMOUNT_OPT), - FUSE_OPT_KEY("fsname=", KEY_FUSERMOUNT_OPT), - FUSE_OPT_KEY("subtype=", KEY_SUBTYPE_OPT), - FUSE_OPT_KEY("large_read", KEY_KERN_OPT), - FUSE_OPT_KEY("blksize=", KEY_KERN_OPT), - FUSE_OPT_KEY("default_permissions", KEY_KERN_OPT), - FUSE_OPT_KEY("context=", KEY_KERN_OPT), - FUSE_OPT_KEY("fscontext=", KEY_KERN_OPT), - FUSE_OPT_KEY("defcontext=", KEY_KERN_OPT), - FUSE_OPT_KEY("rootcontext=", KEY_KERN_OPT), - FUSE_OPT_KEY("max_read=", KEY_KERN_OPT), - FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_KEEP), - FUSE_OPT_KEY("user=", KEY_MTAB_OPT), - FUSE_OPT_KEY("-r", KEY_RO), - FUSE_OPT_KEY("ro", KEY_KERN_FLAG), - FUSE_OPT_KEY("rw", KEY_KERN_FLAG), - FUSE_OPT_KEY("suid", KEY_KERN_FLAG), - FUSE_OPT_KEY("nosuid", KEY_KERN_FLAG), - FUSE_OPT_KEY("dev", KEY_KERN_FLAG), - FUSE_OPT_KEY("nodev", KEY_KERN_FLAG), - FUSE_OPT_KEY("exec", KEY_KERN_FLAG), - FUSE_OPT_KEY("noexec", KEY_KERN_FLAG), - FUSE_OPT_KEY("async", KEY_KERN_FLAG), - FUSE_OPT_KEY("sync", KEY_KERN_FLAG), - FUSE_OPT_KEY("dirsync", KEY_KERN_FLAG), - FUSE_OPT_KEY("atime", KEY_KERN_FLAG), - FUSE_OPT_KEY("noatime", KEY_KERN_FLAG), - FUSE_OPT_KEY("-h", KEY_HELP), - FUSE_OPT_KEY("--help", KEY_HELP), - FUSE_OPT_KEY("-V", KEY_VERSION), - FUSE_OPT_KEY("--version", KEY_VERSION), - FUSE_OPT_END -}; - -static void mount_help(void) -{ - fprintf(stderr, -" -o allow_other allow access to other users\n" -" -o allow_root allow access to root\n" -" -o auto_unmount auto unmount on process termination\n" -" -o nonempty allow mounts over non-empty file/dir\n" -" -o default_permissions enable permission checking by kernel\n" -" -o fsname=NAME set filesystem name\n" -" -o subtype=NAME set filesystem type\n" -" -o large_read issue large read requests (2.4 only)\n" -" -o max_read=N set maximum size of read requests\n" -"\n"); -} - -static void exec_fusermount(const char *argv[]) -{ - execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); - execvp(FUSERMOUNT_PROG, (char **) argv); -} - -static void mount_version(void) -{ - int pid = fork(); - if (!pid) { - const char *argv[] = { FUSERMOUNT_PROG, "--version", NULL }; - exec_fusermount(argv); - _exit(1); - } else if (pid != -1) - waitpid(pid, NULL, 0); -} - -struct mount_flags { - const char *opt; - unsigned long flag; - int on; -}; + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ -static const struct mount_flags mount_flags[] = { - {"rw", MS_RDONLY, 0}, - {"ro", MS_RDONLY, 1}, - {"suid", MS_NOSUID, 0}, - {"nosuid", MS_NOSUID, 1}, - {"dev", MS_NODEV, 0}, - {"nodev", MS_NODEV, 1}, - {"exec", MS_NOEXEC, 0}, - {"noexec", MS_NOEXEC, 1}, - {"async", MS_SYNCHRONOUS, 0}, - {"sync", MS_SYNCHRONOUS, 1}, - {"atime", MS_NOATIME, 0}, - {"noatime", MS_NOATIME, 1}, -#ifndef __NetBSD__ - {"dirsync", MS_DIRSYNC, 1}, +#if defined __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ +# include "mount_bsd.c" +#else +# include "mount_generic.c" +# include "mount_util.c" #endif - {NULL, 0, 0} -}; - -static void set_mount_flag(const char *s, int *flags) -{ - int i; - - for (i = 0; mount_flags[i].opt != NULL; i++) { - const char *opt = mount_flags[i].opt; - if (strcmp(opt, s) == 0) { - if (mount_flags[i].on) - *flags |= mount_flags[i].flag; - else - *flags &= ~mount_flags[i].flag; - return; - } - } - fprintf(stderr, "fuse: internal error, can't find mount flag\n"); - abort(); -} - -static int fuse_mount_opt_proc(void *data, const char *arg, int key, - struct fuse_args *outargs) -{ - struct mount_opts *mo = data; - - switch (key) { - case KEY_ALLOW_ROOT: - if (fuse_opt_add_opt(&mo->kernel_opts, "allow_other") == -1 || - fuse_opt_add_arg(outargs, "-oallow_root") == -1) - return -1; - return 0; - - case KEY_RO: - arg = "ro"; - /* fall through */ - case KEY_KERN_FLAG: - set_mount_flag(arg, &mo->flags); - return 0; - - case KEY_KERN_OPT: - return fuse_opt_add_opt(&mo->kernel_opts, arg); - - case KEY_FUSERMOUNT_OPT: - return fuse_opt_add_opt_escaped(&mo->fusermount_opts, arg); - - case KEY_SUBTYPE_OPT: - return fuse_opt_add_opt(&mo->subtype_opt, arg); - - case KEY_MTAB_OPT: - return fuse_opt_add_opt(&mo->mtab_opts, arg); - - case KEY_HELP: - mount_help(); - mo->ishelp = 1; - break; - - case KEY_VERSION: - mount_version(); - mo->ishelp = 1; - break; - } - return 1; -} - -/* return value: - * >= 0 => fd - * -1 => error - */ -static int receive_fd(int fd) -{ - struct msghdr msg; - struct iovec iov; - char buf[1]; - int rv; - size_t ccmsg[CMSG_SPACE(sizeof(int)) / sizeof(size_t)]; - struct cmsghdr *cmsg; - - iov.iov_base = buf; - iov.iov_len = 1; - - memset(&msg, 0, sizeof(msg)); - msg.msg_name = 0; - msg.msg_namelen = 0; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - /* old BSD implementations should use msg_accrights instead of - * msg_control; the interface is different. */ - msg.msg_control = ccmsg; - msg.msg_controllen = sizeof(ccmsg); - - while(((rv = recvmsg(fd, &msg, 0)) == -1) && errno == EINTR); - if (rv == -1) { - perror("recvmsg"); - return -1; - } - if(!rv) { - /* EOF */ - return -1; - } - - cmsg = CMSG_FIRSTHDR(&msg); - if (cmsg->cmsg_type != SCM_RIGHTS) { - fprintf(stderr, "got control message of unknown type %d\n", - cmsg->cmsg_type); - return -1; - } - return *(int*)CMSG_DATA(cmsg); -} - -void fuse_kern_unmount(const char *mountpoint, int fd) -{ - int res; - int pid; - - if (!mountpoint) - return; - - if (fd != -1) { - struct pollfd pfd; - - pfd.fd = fd; - pfd.events = 0; - res = poll(&pfd, 1, 0); - - /* Need to close file descriptor, otherwise synchronous umount - would recurse into filesystem, and deadlock. - - Caller expects fuse_kern_unmount to close the fd, so close it - anyway. */ - close(fd); - - /* If file poll returns POLLERR on the device file descriptor, - then the filesystem is already unmounted */ - if (res == 1 && (pfd.revents & POLLERR)) - return; - } - - if (geteuid() == 0) { - fuse_mnt_umount("fuse", mountpoint, mountpoint, 1); - return; - } - - res = umount2(mountpoint, 2); - if (res == 0) - return; - - pid = fork(); - if(pid == -1) - return; - - if(pid == 0) { - const char *argv[] = { FUSERMOUNT_PROG, "-u", "-q", "-z", - "--", mountpoint, NULL }; - - exec_fusermount(argv); - _exit(1); - } - waitpid(pid, NULL, 0); -} - -void fuse_unmount_compat22(const char *mountpoint) -{ - fuse_kern_unmount(mountpoint, -1); -} - -static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo, - const char *opts, int quiet) -{ - int fds[2], pid; - int res; - int rv; - - if (!mountpoint) { - fprintf(stderr, "fuse: missing mountpoint parameter\n"); - return -1; - } - - res = socketpair(PF_UNIX, SOCK_STREAM, 0, fds); - if(res == -1) { - perror("fuse: socketpair() failed"); - return -1; - } - - pid = fork(); - if(pid == -1) { - perror("fuse: fork() failed"); - close(fds[0]); - close(fds[1]); - return -1; - } - - if(pid == 0) { - char env[10]; - const char *argv[32]; - int a = 0; - - if (quiet) { - int fd = open("/dev/null", O_RDONLY); - if (fd != -1) { - dup2(fd, 1); - dup2(fd, 2); - } - } - - argv[a++] = FUSERMOUNT_PROG; - if (opts) { - argv[a++] = "-o"; - argv[a++] = opts; - } - argv[a++] = "--"; - argv[a++] = mountpoint; - argv[a++] = NULL; - - close(fds[1]); - fcntl(fds[0], F_SETFD, 0); - snprintf(env, sizeof(env), "%i", fds[0]); - setenv(FUSE_COMMFD_ENV, env, 1); - exec_fusermount(argv); - perror("fuse: failed to exec fusermount"); - _exit(1); - } - - close(fds[0]); - rv = receive_fd(fds[1]); - - if (!mo->auto_unmount) { - /* with auto_unmount option fusermount will not exit until - this socket is closed */ - close(fds[1]); - waitpid(pid, NULL, 0); /* bury zombie */ - } - - return rv; -} - -int fuse_mount_compat22(const char *mountpoint, const char *opts) -{ - struct mount_opts mo; - memset(&mo, 0, sizeof(mo)); - mo.flags = MS_NOSUID | MS_NODEV; - - return fuse_mount_fusermount(mountpoint, &mo, opts, 0); -} - -static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, - const char *mnt_opts) -{ - char tmp[128]; - const char *devname = "/dev/fuse"; - char *source = NULL; - char *type = NULL; - struct stat stbuf; - int fd; - int res; - - if (!mnt) { - fprintf(stderr, "fuse: missing mountpoint parameter\n"); - return -1; - } - - res = stat(mnt, &stbuf); - if (res == -1) { - fprintf(stderr ,"fuse: failed to access mountpoint %s: %s\n", - mnt, strerror(errno)); - return -1; - } - - if (!mo->nonempty) { - res = fuse_mnt_check_empty("fuse", mnt, stbuf.st_mode, - stbuf.st_size); - if (res == -1) - return -1; - } - - if (mo->auto_unmount) { - /* Tell the caller to fallback to fusermount because - auto-unmount does not work otherwise. */ - return -2; - } - - fd = open(devname, O_RDWR); - if (fd == -1) { - if (errno == ENODEV || errno == ENOENT) - fprintf(stderr, "fuse: device not found, try 'modprobe fuse' first\n"); - else - fprintf(stderr, "fuse: failed to open %s: %s\n", - devname, strerror(errno)); - return -1; - } - - snprintf(tmp, sizeof(tmp), "fd=%i,rootmode=%o,user_id=%u,group_id=%u", - fd, stbuf.st_mode & S_IFMT, getuid(), getgid()); - - res = fuse_opt_add_opt(&mo->kernel_opts, tmp); - if (res == -1) - goto out_close; - - source = malloc((mo->fsname ? strlen(mo->fsname) : 0) + - (mo->subtype ? strlen(mo->subtype) : 0) + - strlen(devname) + 32); - - type = malloc((mo->subtype ? strlen(mo->subtype) : 0) + 32); - if (!type || !source) { - fprintf(stderr, "fuse: failed to allocate memory\n"); - goto out_close; - } - - strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); - if (mo->subtype) { - strcat(type, "."); - strcat(type, mo->subtype); - } - strcpy(source, - mo->fsname ? mo->fsname : (mo->subtype ? mo->subtype : devname)); - - res = mount(source, mnt, type, mo->flags, mo->kernel_opts); - if (res == -1 && errno == ENODEV && mo->subtype) { - /* Probably missing subtype support */ - strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); - if (mo->fsname) { - if (!mo->blkdev) - sprintf(source, "%s#%s", mo->subtype, - mo->fsname); - } else { - strcpy(source, type); - } - res = mount(source, mnt, type, mo->flags, mo->kernel_opts); - } - if (res == -1) { - /* - * Maybe kernel doesn't support unprivileged mounts, in this - * case try falling back to fusermount - */ - if (errno == EPERM) { - res = -2; - } else { - int errno_save = errno; - if (mo->blkdev && errno == ENODEV && - !fuse_mnt_check_fuseblk()) - fprintf(stderr, - "fuse: 'fuseblk' support missing\n"); - else - fprintf(stderr, "fuse: mount failed: %s\n", - strerror(errno_save)); - } - - goto out_close; - } - -#ifndef __NetBSD__ -#ifndef IGNORE_MTAB - if (geteuid() == 0) { - char *newmnt = fuse_mnt_resolve_path("fuse", mnt); - res = -1; - if (!newmnt) - goto out_umount; - - res = fuse_mnt_add_mount("fuse", source, newmnt, type, - mnt_opts); - free(newmnt); - if (res == -1) - goto out_umount; - } -#endif /* IGNORE_MTAB */ -#endif /* __NetBSD__ */ - free(type); - free(source); - - return fd; - -out_umount: - umount2(mnt, 2); /* lazy umount */ -out_close: - free(type); - free(source); - close(fd); - return res; -} - -static int get_mnt_flag_opts(char **mnt_optsp, int flags) -{ - int i; - - if (!(flags & MS_RDONLY) && fuse_opt_add_opt(mnt_optsp, "rw") == -1) - return -1; - - for (i = 0; mount_flags[i].opt != NULL; i++) { - if (mount_flags[i].on && (flags & mount_flags[i].flag) && - fuse_opt_add_opt(mnt_optsp, mount_flags[i].opt) == -1) - return -1; - } - return 0; -} - -int fuse_kern_mount(const char *mountpoint, struct fuse_args *args) -{ - struct mount_opts mo; - int res = -1; - char *mnt_opts = NULL; - - memset(&mo, 0, sizeof(mo)); - mo.flags = MS_NOSUID | MS_NODEV; - - if (args && - fuse_opt_parse(args, &mo, fuse_mount_opts, fuse_mount_opt_proc) == -1) - return -1; - - if (mo.allow_other && mo.allow_root) { - fprintf(stderr, "fuse: 'allow_other' and 'allow_root' options are mutually exclusive\n"); - goto out; - } - res = 0; - if (mo.ishelp) - goto out; - - res = -1; - if (get_mnt_flag_opts(&mnt_opts, mo.flags) == -1) - goto out; - if (mo.kernel_opts && fuse_opt_add_opt(&mnt_opts, mo.kernel_opts) == -1) - goto out; - if (mo.mtab_opts && fuse_opt_add_opt(&mnt_opts, mo.mtab_opts) == -1) - goto out; - - res = fuse_mount_sys(mountpoint, &mo, mnt_opts); - if (res == -2) { - if (mo.fusermount_opts && - fuse_opt_add_opt(&mnt_opts, mo.fusermount_opts) == -1) - goto out; - - if (mo.subtype) { - char *tmp_opts = NULL; - - res = -1; - if (fuse_opt_add_opt(&tmp_opts, mnt_opts) == -1 || - fuse_opt_add_opt(&tmp_opts, mo.subtype_opt) == -1) { - free(tmp_opts); - goto out; - } - - res = fuse_mount_fusermount(mountpoint, &mo, tmp_opts, 1); - free(tmp_opts); - if (res == -1) - res = fuse_mount_fusermount(mountpoint, &mo, - mnt_opts, 0); - } else { - res = fuse_mount_fusermount(mountpoint, &mo, mnt_opts, 0); - } - } -out: - free(mnt_opts); - free(mo.fsname); - free(mo.subtype); - free(mo.fusermount_opts); - free(mo.subtype_opt); - free(mo.kernel_opts); - free(mo.mtab_opts); - return res; -} - -FUSE_SYMVER(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2"); -FUSE_SYMVER(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2"); diff --git a/libfuse/lib/mount_generic.c b/libfuse/lib/mount_generic.c new file mode 100644 index 00000000..227a4082 --- /dev/null +++ b/libfuse/lib/mount_generic.c @@ -0,0 +1,644 @@ +/* + FUSE: Filesystem in Userspace + Copyright (C) 2001-2007 Miklos Szeredi + + This program can be distributed under the terms of the GNU LGPLv2. + See the file COPYING.LIB. +*/ + +#include "config.h" +#include "fuse_i.h" +#include "fuse_misc.h" +#include "fuse_opt.h" +#include "fuse_common_compat.h" +#include "mount_util.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __NetBSD__ +#include + +#define MS_RDONLY MNT_RDONLY +#define MS_NOSUID MNT_NOSUID +#define MS_NODEV MNT_NODEV +#define MS_NOEXEC MNT_NOEXEC +#define MS_SYNCHRONOUS MNT_SYNCHRONOUS +#define MS_NOATIME MNT_NOATIME + +#define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0) +#endif + +#define FUSERMOUNT_PROG "fusermount" +#define FUSE_COMMFD_ENV "_FUSE_COMMFD" + +#ifndef HAVE_FORK +#define fork() vfork() +#endif + +#ifndef MS_DIRSYNC +#define MS_DIRSYNC 128 +#endif + +enum { + KEY_KERN_FLAG, + KEY_KERN_OPT, + KEY_FUSERMOUNT_OPT, + KEY_SUBTYPE_OPT, + KEY_MTAB_OPT, + KEY_ALLOW_ROOT, + KEY_RO, + KEY_HELP, + KEY_VERSION, +}; + +struct mount_opts { + int allow_other; + int allow_root; + int ishelp; + int flags; + int nonempty; + int auto_unmount; + int blkdev; + char *fsname; + char *subtype; + char *subtype_opt; + char *mtab_opts; + char *fusermount_opts; + char *kernel_opts; +}; + +#define FUSE_MOUNT_OPT(t, p) { t, offsetof(struct mount_opts, p), 1 } + +static const struct fuse_opt fuse_mount_opts[] = { + FUSE_MOUNT_OPT("allow_other", allow_other), + FUSE_MOUNT_OPT("allow_root", allow_root), + FUSE_MOUNT_OPT("nonempty", nonempty), + FUSE_MOUNT_OPT("blkdev", blkdev), + FUSE_MOUNT_OPT("auto_unmount", auto_unmount), + FUSE_MOUNT_OPT("fsname=%s", fsname), + FUSE_MOUNT_OPT("subtype=%s", subtype), + FUSE_OPT_KEY("allow_other", KEY_KERN_OPT), + FUSE_OPT_KEY("allow_root", KEY_ALLOW_ROOT), + FUSE_OPT_KEY("nonempty", KEY_FUSERMOUNT_OPT), + FUSE_OPT_KEY("auto_unmount", KEY_FUSERMOUNT_OPT), + FUSE_OPT_KEY("blkdev", KEY_FUSERMOUNT_OPT), + FUSE_OPT_KEY("fsname=", KEY_FUSERMOUNT_OPT), + FUSE_OPT_KEY("subtype=", KEY_SUBTYPE_OPT), + FUSE_OPT_KEY("large_read", KEY_KERN_OPT), + FUSE_OPT_KEY("blksize=", KEY_KERN_OPT), + FUSE_OPT_KEY("default_permissions", KEY_KERN_OPT), + FUSE_OPT_KEY("context=", KEY_KERN_OPT), + FUSE_OPT_KEY("fscontext=", KEY_KERN_OPT), + FUSE_OPT_KEY("defcontext=", KEY_KERN_OPT), + FUSE_OPT_KEY("rootcontext=", KEY_KERN_OPT), + FUSE_OPT_KEY("max_read=", KEY_KERN_OPT), + FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_KEEP), + FUSE_OPT_KEY("user=", KEY_MTAB_OPT), + FUSE_OPT_KEY("-r", KEY_RO), + FUSE_OPT_KEY("ro", KEY_KERN_FLAG), + FUSE_OPT_KEY("rw", KEY_KERN_FLAG), + FUSE_OPT_KEY("suid", KEY_KERN_FLAG), + FUSE_OPT_KEY("nosuid", KEY_KERN_FLAG), + FUSE_OPT_KEY("dev", KEY_KERN_FLAG), + FUSE_OPT_KEY("nodev", KEY_KERN_FLAG), + FUSE_OPT_KEY("exec", KEY_KERN_FLAG), + FUSE_OPT_KEY("noexec", KEY_KERN_FLAG), + FUSE_OPT_KEY("async", KEY_KERN_FLAG), + FUSE_OPT_KEY("sync", KEY_KERN_FLAG), + FUSE_OPT_KEY("dirsync", KEY_KERN_FLAG), + FUSE_OPT_KEY("atime", KEY_KERN_FLAG), + FUSE_OPT_KEY("noatime", KEY_KERN_FLAG), + FUSE_OPT_KEY("-h", KEY_HELP), + FUSE_OPT_KEY("--help", KEY_HELP), + FUSE_OPT_KEY("-V", KEY_VERSION), + FUSE_OPT_KEY("--version", KEY_VERSION), + FUSE_OPT_END +}; + +static void mount_help(void) +{ + fprintf(stderr, +" -o allow_other allow access to other users\n" +" -o allow_root allow access to root\n" +" -o auto_unmount auto unmount on process termination\n" +" -o nonempty allow mounts over non-empty file/dir\n" +" -o default_permissions enable permission checking by kernel\n" +" -o fsname=NAME set filesystem name\n" +" -o subtype=NAME set filesystem type\n" +" -o large_read issue large read requests (2.4 only)\n" +" -o max_read=N set maximum size of read requests\n" +"\n"); +} + +static void exec_fusermount(const char *argv[]) +{ + execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); + execvp(FUSERMOUNT_PROG, (char **) argv); +} + +static void mount_version(void) +{ + int pid = fork(); + if (!pid) { + const char *argv[] = { FUSERMOUNT_PROG, "--version", NULL }; + exec_fusermount(argv); + _exit(1); + } else if (pid != -1) + waitpid(pid, NULL, 0); +} + +struct mount_flags { + const char *opt; + unsigned long flag; + int on; +}; + +static const struct mount_flags mount_flags[] = { + {"rw", MS_RDONLY, 0}, + {"ro", MS_RDONLY, 1}, + {"suid", MS_NOSUID, 0}, + {"nosuid", MS_NOSUID, 1}, + {"dev", MS_NODEV, 0}, + {"nodev", MS_NODEV, 1}, + {"exec", MS_NOEXEC, 0}, + {"noexec", MS_NOEXEC, 1}, + {"async", MS_SYNCHRONOUS, 0}, + {"sync", MS_SYNCHRONOUS, 1}, + {"atime", MS_NOATIME, 0}, + {"noatime", MS_NOATIME, 1}, +#ifndef __NetBSD__ + {"dirsync", MS_DIRSYNC, 1}, +#endif + {NULL, 0, 0} +}; + +static void set_mount_flag(const char *s, int *flags) +{ + int i; + + for (i = 0; mount_flags[i].opt != NULL; i++) { + const char *opt = mount_flags[i].opt; + if (strcmp(opt, s) == 0) { + if (mount_flags[i].on) + *flags |= mount_flags[i].flag; + else + *flags &= ~mount_flags[i].flag; + return; + } + } + fprintf(stderr, "fuse: internal error, can't find mount flag\n"); + abort(); +} + +static int fuse_mount_opt_proc(void *data, const char *arg, int key, + struct fuse_args *outargs) +{ + struct mount_opts *mo = data; + + switch (key) { + case KEY_ALLOW_ROOT: + if (fuse_opt_add_opt(&mo->kernel_opts, "allow_other") == -1 || + fuse_opt_add_arg(outargs, "-oallow_root") == -1) + return -1; + return 0; + + case KEY_RO: + arg = "ro"; + /* fall through */ + case KEY_KERN_FLAG: + set_mount_flag(arg, &mo->flags); + return 0; + + case KEY_KERN_OPT: + return fuse_opt_add_opt(&mo->kernel_opts, arg); + + case KEY_FUSERMOUNT_OPT: + return fuse_opt_add_opt_escaped(&mo->fusermount_opts, arg); + + case KEY_SUBTYPE_OPT: + return fuse_opt_add_opt(&mo->subtype_opt, arg); + + case KEY_MTAB_OPT: + return fuse_opt_add_opt(&mo->mtab_opts, arg); + + case KEY_HELP: + mount_help(); + mo->ishelp = 1; + break; + + case KEY_VERSION: + mount_version(); + mo->ishelp = 1; + break; + } + return 1; +} + +/* return value: + * >= 0 => fd + * -1 => error + */ +static int receive_fd(int fd) +{ + struct msghdr msg; + struct iovec iov; + char buf[1]; + int rv; + size_t ccmsg[CMSG_SPACE(sizeof(int)) / sizeof(size_t)]; + struct cmsghdr *cmsg; + + iov.iov_base = buf; + iov.iov_len = 1; + + memset(&msg, 0, sizeof(msg)); + msg.msg_name = 0; + msg.msg_namelen = 0; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + /* old BSD implementations should use msg_accrights instead of + * msg_control; the interface is different. */ + msg.msg_control = ccmsg; + msg.msg_controllen = sizeof(ccmsg); + + while(((rv = recvmsg(fd, &msg, 0)) == -1) && errno == EINTR); + if (rv == -1) { + perror("recvmsg"); + return -1; + } + if(!rv) { + /* EOF */ + return -1; + } + + cmsg = CMSG_FIRSTHDR(&msg); + if (cmsg->cmsg_type != SCM_RIGHTS) { + fprintf(stderr, "got control message of unknown type %d\n", + cmsg->cmsg_type); + return -1; + } + return *(int*)CMSG_DATA(cmsg); +} + +void fuse_kern_unmount(const char *mountpoint, int fd) +{ + int res; + int pid; + + if (!mountpoint) + return; + + if (fd != -1) { + struct pollfd pfd; + + pfd.fd = fd; + pfd.events = 0; + res = poll(&pfd, 1, 0); + + /* Need to close file descriptor, otherwise synchronous umount + would recurse into filesystem, and deadlock. + + Caller expects fuse_kern_unmount to close the fd, so close it + anyway. */ + close(fd); + + /* If file poll returns POLLERR on the device file descriptor, + then the filesystem is already unmounted */ + if (res == 1 && (pfd.revents & POLLERR)) + return; + } + + if (geteuid() == 0) { + fuse_mnt_umount("fuse", mountpoint, mountpoint, 1); + return; + } + + res = umount2(mountpoint, 2); + if (res == 0) + return; + + pid = fork(); + if(pid == -1) + return; + + if(pid == 0) { + const char *argv[] = { FUSERMOUNT_PROG, "-u", "-q", "-z", + "--", mountpoint, NULL }; + + exec_fusermount(argv); + _exit(1); + } + waitpid(pid, NULL, 0); +} + +void fuse_unmount_compat22(const char *mountpoint) +{ + fuse_kern_unmount(mountpoint, -1); +} + +static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo, + const char *opts, int quiet) +{ + int fds[2], pid; + int res; + int rv; + + if (!mountpoint) { + fprintf(stderr, "fuse: missing mountpoint parameter\n"); + return -1; + } + + res = socketpair(PF_UNIX, SOCK_STREAM, 0, fds); + if(res == -1) { + perror("fuse: socketpair() failed"); + return -1; + } + + pid = fork(); + if(pid == -1) { + perror("fuse: fork() failed"); + close(fds[0]); + close(fds[1]); + return -1; + } + + if(pid == 0) { + char env[10]; + const char *argv[32]; + int a = 0; + + if (quiet) { + int fd = open("/dev/null", O_RDONLY); + if (fd != -1) { + dup2(fd, 1); + dup2(fd, 2); + } + } + + argv[a++] = FUSERMOUNT_PROG; + if (opts) { + argv[a++] = "-o"; + argv[a++] = opts; + } + argv[a++] = "--"; + argv[a++] = mountpoint; + argv[a++] = NULL; + + close(fds[1]); + fcntl(fds[0], F_SETFD, 0); + snprintf(env, sizeof(env), "%i", fds[0]); + setenv(FUSE_COMMFD_ENV, env, 1); + exec_fusermount(argv); + perror("fuse: failed to exec fusermount"); + _exit(1); + } + + close(fds[0]); + rv = receive_fd(fds[1]); + + if (!mo->auto_unmount) { + /* with auto_unmount option fusermount will not exit until + this socket is closed */ + close(fds[1]); + waitpid(pid, NULL, 0); /* bury zombie */ + } + + return rv; +} + +int fuse_mount_compat22(const char *mountpoint, const char *opts) +{ + struct mount_opts mo; + memset(&mo, 0, sizeof(mo)); + mo.flags = MS_NOSUID | MS_NODEV; + + return fuse_mount_fusermount(mountpoint, &mo, opts, 0); +} + +static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, + const char *mnt_opts) +{ + char tmp[128]; + const char *devname = "/dev/fuse"; + char *source = NULL; + char *type = NULL; + struct stat stbuf; + int fd; + int res; + + if (!mnt) { + fprintf(stderr, "fuse: missing mountpoint parameter\n"); + return -1; + } + + res = stat(mnt, &stbuf); + if (res == -1) { + fprintf(stderr ,"fuse: failed to access mountpoint %s: %s\n", + mnt, strerror(errno)); + return -1; + } + + if (!mo->nonempty) { + res = fuse_mnt_check_empty("fuse", mnt, stbuf.st_mode, + stbuf.st_size); + if (res == -1) + return -1; + } + + if (mo->auto_unmount) { + /* Tell the caller to fallback to fusermount because + auto-unmount does not work otherwise. */ + return -2; + } + + fd = open(devname, O_RDWR); + if (fd == -1) { + if (errno == ENODEV || errno == ENOENT) + fprintf(stderr, "fuse: device not found, try 'modprobe fuse' first\n"); + else + fprintf(stderr, "fuse: failed to open %s: %s\n", + devname, strerror(errno)); + return -1; + } + + snprintf(tmp, sizeof(tmp), "fd=%i,rootmode=%o,user_id=%u,group_id=%u", + fd, stbuf.st_mode & S_IFMT, getuid(), getgid()); + + res = fuse_opt_add_opt(&mo->kernel_opts, tmp); + if (res == -1) + goto out_close; + + source = malloc((mo->fsname ? strlen(mo->fsname) : 0) + + (mo->subtype ? strlen(mo->subtype) : 0) + + strlen(devname) + 32); + + type = malloc((mo->subtype ? strlen(mo->subtype) : 0) + 32); + if (!type || !source) { + fprintf(stderr, "fuse: failed to allocate memory\n"); + goto out_close; + } + + strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); + if (mo->subtype) { + strcat(type, "."); + strcat(type, mo->subtype); + } + strcpy(source, + mo->fsname ? mo->fsname : (mo->subtype ? mo->subtype : devname)); + + res = mount(source, mnt, type, mo->flags, mo->kernel_opts); + if (res == -1 && errno == ENODEV && mo->subtype) { + /* Probably missing subtype support */ + strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); + if (mo->fsname) { + if (!mo->blkdev) + sprintf(source, "%s#%s", mo->subtype, + mo->fsname); + } else { + strcpy(source, type); + } + res = mount(source, mnt, type, mo->flags, mo->kernel_opts); + } + if (res == -1) { + /* + * Maybe kernel doesn't support unprivileged mounts, in this + * case try falling back to fusermount + */ + if (errno == EPERM) { + res = -2; + } else { + int errno_save = errno; + if (mo->blkdev && errno == ENODEV && + !fuse_mnt_check_fuseblk()) + fprintf(stderr, + "fuse: 'fuseblk' support missing\n"); + else + fprintf(stderr, "fuse: mount failed: %s\n", + strerror(errno_save)); + } + + goto out_close; + } + +#ifndef __NetBSD__ +#ifndef IGNORE_MTAB + if (geteuid() == 0) { + char *newmnt = fuse_mnt_resolve_path("fuse", mnt); + res = -1; + if (!newmnt) + goto out_umount; + + res = fuse_mnt_add_mount("fuse", source, newmnt, type, + mnt_opts); + free(newmnt); + if (res == -1) + goto out_umount; + } +#endif /* IGNORE_MTAB */ +#endif /* __NetBSD__ */ + free(type); + free(source); + + return fd; + +out_umount: + umount2(mnt, 2); /* lazy umount */ +out_close: + free(type); + free(source); + close(fd); + return res; +} + +static int get_mnt_flag_opts(char **mnt_optsp, int flags) +{ + int i; + + if (!(flags & MS_RDONLY) && fuse_opt_add_opt(mnt_optsp, "rw") == -1) + return -1; + + for (i = 0; mount_flags[i].opt != NULL; i++) { + if (mount_flags[i].on && (flags & mount_flags[i].flag) && + fuse_opt_add_opt(mnt_optsp, mount_flags[i].opt) == -1) + return -1; + } + return 0; +} + +int fuse_kern_mount(const char *mountpoint, struct fuse_args *args) +{ + struct mount_opts mo; + int res = -1; + char *mnt_opts = NULL; + + memset(&mo, 0, sizeof(mo)); + mo.flags = MS_NOSUID | MS_NODEV; + + if (args && + fuse_opt_parse(args, &mo, fuse_mount_opts, fuse_mount_opt_proc) == -1) + return -1; + + if (mo.allow_other && mo.allow_root) { + fprintf(stderr, "fuse: 'allow_other' and 'allow_root' options are mutually exclusive\n"); + goto out; + } + res = 0; + if (mo.ishelp) + goto out; + + res = -1; + if (get_mnt_flag_opts(&mnt_opts, mo.flags) == -1) + goto out; + if (mo.kernel_opts && fuse_opt_add_opt(&mnt_opts, mo.kernel_opts) == -1) + goto out; + if (mo.mtab_opts && fuse_opt_add_opt(&mnt_opts, mo.mtab_opts) == -1) + goto out; + + res = fuse_mount_sys(mountpoint, &mo, mnt_opts); + if (res == -2) { + if (mo.fusermount_opts && + fuse_opt_add_opt(&mnt_opts, mo.fusermount_opts) == -1) + goto out; + + if (mo.subtype) { + char *tmp_opts = NULL; + + res = -1; + if (fuse_opt_add_opt(&tmp_opts, mnt_opts) == -1 || + fuse_opt_add_opt(&tmp_opts, mo.subtype_opt) == -1) { + free(tmp_opts); + goto out; + } + + res = fuse_mount_fusermount(mountpoint, &mo, tmp_opts, 1); + free(tmp_opts); + if (res == -1) + res = fuse_mount_fusermount(mountpoint, &mo, + mnt_opts, 0); + } else { + res = fuse_mount_fusermount(mountpoint, &mo, mnt_opts, 0); + } + } +out: + free(mnt_opts); + free(mo.fsname); + free(mo.subtype); + free(mo.fusermount_opts); + free(mo.subtype_opt); + free(mo.kernel_opts); + free(mo.mtab_opts); + return res; +} + +FUSE_SYMVER(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2"); +FUSE_SYMVER(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2"); diff --git a/src/fuse_ioctl.cpp b/src/fuse_ioctl.cpp index cc049133..012edfe7 100644 --- a/src/fuse_ioctl.cpp +++ b/src/fuse_ioctl.cpp @@ -75,10 +75,10 @@ namespace l { static int - ioctl(const int fd_, - const int cmd_, - void *data_, - uint32_t *out_bufsz_) + ioctl(const int fd_, + const uint32_t cmd_, + void *data_, + uint32_t *out_bufsz_) { int rv; @@ -94,9 +94,7 @@ namespace l break; } - rv = ((_IOC_DIR(cmd_) == _IOC_NONE) ? - fs::ioctl(fd_,cmd_) : - fs::ioctl(fd_,cmd_,data_)); + rv = fs::ioctl(fd_,cmd_,data_); return ((rv == -1) ? -errno : rv); } @@ -104,7 +102,7 @@ namespace l static int ioctl_file(fuse_file_info *ffi_, - const int cmd_, + const uint32_t cmd_, void *data_, uint32_t *out_bufsz_) { @@ -124,7 +122,7 @@ namespace l const Branches &branches_, const uint64_t minfreespace_, const char *fusepath_, - const int cmd_, + const uint32_t cmd_, void *data_, uint32_t *out_bufsz_) { @@ -154,7 +152,7 @@ namespace l static int ioctl_dir(fuse_file_info *ffi_, - const int cmd_, + const uint32_t cmd_, void *data_, uint32_t *out_bufsz_) {