summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-12-13 18:31:00 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-12-23 16:58:04 +0100
commit523a059fb7d5844ebcca279b2f83aff9164b444c (patch)
tree4353fa9fa64a17ef2c5548f0c9f73f5e5f389f6a
parentexfat: Update to 1.2.2 (diff)
downloadandroid_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.gz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.bz2
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.lz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.xz
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.tar.zst
android_bootable_recovery-523a059fb7d5844ebcca279b2f83aff9164b444c.zip
-rw-r--r--fuse/AUTHORS9
-rw-r--r--fuse/Android.mk25
-rw-r--r--fuse/COPYING339
-rw-r--r--fuse/COPYING.LIB502
-rw-r--r--fuse/ChangeLog3535
-rw-r--r--fuse/README384
-rw-r--r--fuse/android/config.h (renamed from fuse/include/config.h)6
-rw-r--r--fuse/android/statvfs.c48
-rw-r--r--fuse/android/sys/statvfs.h39
-rw-r--r--fuse/buffer.c10
-rw-r--r--fuse/cuse_lowlevel.c4
-rw-r--r--fuse/fuse.c110
-rw-r--r--fuse/fuse_i.h2
-rw-r--r--fuse/fuse_kern_chan.c5
-rw-r--r--fuse/fuse_loop_mt.c40
-rw-r--r--fuse/fuse_lowlevel.c11
-rw-r--r--fuse/fuse_mt.c2
-rw-r--r--fuse/fuse_session.c10
-rw-r--r--fuse/fuse_signals.c22
-rw-r--r--fuse/fuse_versionscript210
-rw-r--r--fuse/fusexmp.c385
-rw-r--r--fuse/helper.c16
-rw-r--r--fuse/include/Makefile515
-rw-r--r--fuse/include/Makefile.in515
-rw-r--r--fuse/include/config.h.in86
-rw-r--r--fuse/include/cuse_lowlevel.h4
-rw-r--r--fuse/include/fuse.h41
-rw-r--r--fuse/include/fuse_common.h4
-rw-r--r--fuse/include/fuse_compat.h32
-rw-r--r--fuse/include/fuse_lowlevel.h28
-rw-r--r--fuse/include/fuse_lowlevel_compat.h16
-rw-r--r--fuse/include/stamp-h11
-rw-r--r--fuse/include/sys/statvfs.h18
-rw-r--r--fuse/include/ulockmgr.h2
-rw-r--r--fuse/modules/iconv.c739
-rw-r--r--fuse/modules/subdir.c697
-rw-r--r--fuse/mount.c20
-rw-r--r--fuse/mount_bsd.c9
-rw-r--r--fuse/mount_util.c34
-rw-r--r--fuse/mount_util.h2
-rw-r--r--fuse/ulockmgr.c4
41 files changed, 6782 insertions, 1699 deletions
diff --git a/fuse/AUTHORS b/fuse/AUTHORS
new file mode 100644
index 000000000..8c1e88f2c
--- /dev/null
+++ b/fuse/AUTHORS
@@ -0,0 +1,9 @@
+FUSE
+----
+
+Miklos Szeredi <miklos@szeredi.hu>
+
+CUSE
+----
+
+Tejun Heo <teheo@suse.de>
diff --git a/fuse/Android.mk b/fuse/Android.mk
index f53142692..5260e146b 100644
--- a/fuse/Android.mk
+++ b/fuse/Android.mk
@@ -17,6 +17,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
+ android/statvfs.c \
buffer.c \
cuse_lowlevel.c \
fuse.c \
@@ -33,10 +34,11 @@ LOCAL_SRC_FILES := \
ulockmgr.c
LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/android \
$(LOCAL_PATH)/include
LOCAL_SHARED_LIBRARIES := \
- libutils libdl
+ libutils
LOCAL_CFLAGS := \
-D_FILE_OFFSET_BITS=64 \
@@ -47,24 +49,3 @@ LOCAL_MODULE := libfusetwrp
LOCAL_MODULE_TAGS := optional
include $(BUILD_STATIC_LIBRARY)
-#include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- fusexmp.c
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include
-
-LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64
-
-LOCAL_MODULE := fusexmp
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STATIC_LIBRARIES := libfusetwrp
-
-LOCAL_SHARED_LIBRARIES := \
- libutils libdl
-
-include $(BUILD_EXECUTABLE)
diff --git a/fuse/COPYING b/fuse/COPYING
new file mode 100644
index 000000000..d159169d1
--- /dev/null
+++ b/fuse/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/fuse/COPYING.LIB b/fuse/COPYING.LIB
new file mode 100644
index 000000000..4362b4915
--- /dev/null
+++ b/fuse/COPYING.LIB
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/fuse/ChangeLog b/fuse/ChangeLog
new file mode 100644
index 000000000..f2e5d024f
--- /dev/null
+++ b/fuse/ChangeLog
@@ -0,0 +1,3535 @@
+2015-05-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.9.4
+
+2015-05-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix exec environment for mount and umount. Found by
+ Tavis Ormandy (CVE-2015-3202).
+
+2015-02-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix fuse_remove_signal_handlers() to properly restore
+ the default signal handler. Reported by: Chris Johnson
+
+2014-07-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: highlevel API: fix directory file handle passed to
+ ioctl() method. Reported by Eric Biggers
+
+2014-07-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: document deadlock avoidance for
+ fuse_notify_inval_entry() and fuse_notify_delete()
+
+ * fusermount, libfuse: send value as unsigned in "user_id=" and
+ "group_id=" options. Uids/gids larger than 2147483647 would
+ result in EINVAL when mounting the filesystem. This also needs a
+ fix in the kernel.
+
+2014-03-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Initilaize stat buffer passed to ->getattr() and ->fgetattr() to
+ zero in all cases. Reported by Daniel Iwan
+
+2013-08-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: Add missing includes. This allows compiling fuse with
+ musl. Patch by Daniel Thau
+
+2013-07-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.9.3
+
+2013-06-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix multiple close of device fd. Reported by Dan
+ Greenfield
+
+2013-03-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix thread cancel race. Exiting a worker my race with
+ cancelling that same worker. This caused a segmenation
+ fault. Reported and tested by Anatol Pomozov
+
+2013-02-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix crash in unlock_path(). Patch by Ratna Manoj
+
+ * libfuse: fix the 'remember' option. The lru list was not
+ initialized for the "/" path. This resulted in remove_node_lru()
+ crashing on LOOKUP-DOTDOT. Patch by Madan Valluri
+
+ * libfuse: configure: detect new util-linux
+
+ * libfuse: Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER.
+ Patch by Anatol Pomozov
+
+ * libfuse: rename ./configure.in to ./configure.ac. Patch by
+ Anatol Pomozov
+
+2012-10-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.9.2
+
+2012-10-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix deadlock in libfuse. Running "svn update" on a fuse
+ filesystem could deadlock because of a bug in the way the paths
+ are locked. Reported by Kazuaki Anami
+
+2012-08-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix missing config.h in buffer.c. Reported by Matthew Gabeler-Lee
+
+2012-08-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Not unhashing the name in forget (commit on 2011-12-09) broke
+ the forget logic in a subtle way, resulting in "fuse internal
+ error: node NNN not found" and causing the filesystem daemon to
+ abort. Fix by incrementing the node refcount if nlookup goes from
+ zero to one. Reported by Kyle Lippincott
+
+2012-08-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix linking against GNU libiconv. Patch by Natanael Copa
+
+2012-07-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.9.1
+
+2012-07-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix crash caused by freeing a stack address. Reported by Itay
+ Perl
+
+2012-07-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix install of mount.fuse from out-of-tree build. Patch by
+ Olivier Blin
+
+ * Fix build with automake >= 1.12.1. Patch by Olivier Blin
+
+2012-04-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fallocate operation. Only works on linux kernels 3.5 or
+ later. Patch by Anatol Pomozov
+
+2012-05-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Linking to a library that uses threads requires the application
+ to be linked with -pthreads otherwise some pthread functions will
+ be linked to stubs in glibc. So move -pthread from Libs.private
+ to Libs in fuse.pc. Reported by Werner Fink
+
+ * Fix the compile command in the examples. Reported by Luciano
+ Dalle Ore
+
+2012-04-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.9.0
+
+2012-04-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing fuse_fs_flock to fuse_versionscript
+
+2012-04-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check protocol version before sending notifications and return
+ -ENOSYS if a particular notification is not supported.
+
+ * Add 'flag_utime_omit_ok' flag to fuse_operations. If the
+ filesystem sets this flag then ->utimens() will receive UTIME_OMIT
+ and UTIME_NOW values as specified in utimensat(2).
+
+2012-01-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Interpret octal escape codes in options. Requested by Jan
+ Engelhardt
+
+2012-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add man pages for fusermount, mount.fuse and ulockmgr_server.
+ Lifted from the Debian package. The man pages were written by
+ Daniel Baumann and Bastien Roucaries
+
+2012-01-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Disable symbol versions on MacOSX. Patch by Anatol Pomozov
+
+2012-01-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove unnecessary mutex unlock at the end of multithreaded
+ event loop.
+
+2011-12-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix hang in wait_on_path(). Reported by Ville Silventoinen
+
+ * Don't unhash name in FORGET. This resulted in ENOENT being
+ returned for unlinked but still open files if the kernel sent a
+ FORGET request for the parent directory.
+
+ * Free request in fuse_reply_data().
+
+2011-12-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix build if FUSE_NODE_SLAB is not defined. Patch by Emmanuel
+ Dreyfus
+
+ * Check for availability of utimensat() function. Patch by
+ Emmanuel Dreyfus
+
+2011-12-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fuse_lowlevel_notify_delete() which tells the kernel that a
+ file or directory is deleted. Patch by John Muir
+
+2011-12-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Update retrieve_reply() method
+
+2011-12-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Low level API: lock argument of fuse_reply_lock should have a
+ 'const' qualifier. Reported by Shachar Sharon
+
+ * Add support for ioctl on directories. Reported by Antonio SJ
+ Musumeci
+
+2011-10-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Reply to request with ENOMEM in case of failure to allocate
+ request structure. Otherwise the task issuing the request will
+ just freeze up until the filesystem daemon is killed. Reported by
+ Stephan Kulow
+
+2011-09-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Replace daemon() function with fork(). Patch by Anatol Pomozov
+
+2011-08-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * If configured with --disable-mtab then don't call mount(8) from
+ libfuse to update the mtab. Reported by: James Sierp
+
+2011-08-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use LRU list for cleaning up the cache if the "remember=T"
+ option was given. Patch by therealneworld@gmail.com
+
+2011-07-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add ->flock() operation to low and high level interfaces. This
+ fixes problems with emulating flock() with POSIX locking.
+ Reported by Sebastian Pipping. As with lock/setlk/getlk most
+ filesystems don't need to implement this, as the kernel takes care
+ of file locking. The only reason to implement locking operations
+ is for network filesystems which want file locking to work between
+ clients.
+
+2011-07-02 Sebastian Pipping <sebastian@pipping.org>
+
+ * Make xmp_utimens of examples "fusexmp" and "fusexmp_fh"
+ not follow symlinks as other layers do that already.
+
+2011-06-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add "remember" option. This works similar to "noforget" except
+ that eventually the node will be allowed to expire from the cache.
+ Patch by therealneworld@gmail.com
+
+2011-05-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check if splice/vmsplice are supported
+
+2011-05-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove -lrt -ldl from fuse.pc for dynamic linking since
+ libfuse.so is already linked with these libraries. Reported by:
+ Nikolaus Rath
+
+2011-05-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Cleaner build output. Patch by Reuben Hawkins
+
+2011-05-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Disable splice by default, add "splice_read", "splice_write" and
+ "splice_move" options. Keep the "no_splice_*" variants, which can
+ disable splice even if the filesystem explicitly enables it.
+
+2011-04-15 Max Krasnyansky <maxk@kernel.org>
+ * Added support for "auto_unmount" option which unmounts the
+ filesystem automatically on process exit (or crash).
+
+2011-03-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Patches by Laszlo Papp fixing various issues found by the
+ Coverity checker
+
+2011-03-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * In case of failure to add to /etc/mtab don't umount. Reported
+ by Marc Deslauriers
+
+2011-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: In fuse_session_loop_mt() don't pause when exiting the
+ worker threads. The pause() was added in 2.2.1 to prevent
+ segfault on pthread_cancel() on an exited, detached thread. Now
+ worker threads are not detached and pthread_cancel() should work
+ fine even after the thread exited. Reported by Boris Protopopov
+
+2011-01-31 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: chdir to / before performing mount/umount
+
+ * fusermount: only allow mount and umount if util-linux supports
+ --no-canonicalize
+
+2010-12-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Highlevel lib: allow hash tables to shrink
+
+ * Highlevel lib: add slab allocation for node cache. This will
+ allow the memory used by the filesystem to grow and shrink
+ depending on how many inodes are currently cached.
+
+2010-12-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Highlevel lib: use dynamically resized hash table for looking up
+ by name and node ID.
+
+2010-12-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Allow batching of forget requests. This allows forget requests
+ to be processed faster and doesn't require a modification to fuse
+ filesystems. Reported by Terje Malmedal
+
+ * Add ->forget_multi() operation to the lowlevel API. The
+ filesystem may implement this to process multiple forget requests
+ in one call
+
+ * Fix the ambiguity of ioctl ABI on the kernel/userspace boundary
+ for 32bit vs. 64bit userspace
+
+2010-11-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add new write_buf() method to the highlevel API. Similarly to
+ the lowlevel write_buf() method, this allows implementing zero
+ copy writes.
+
+ * Add a new read_buf() method to the highlevel API. This allows
+ returning a generic buffer from the read method, which in turn
+ allows zero copy reads.
+
+ * In fusexmp_fh implement the ->read_buf() and ->write_buf()
+ methods. Leave the ->read() and ->write() implementations for
+ reference, even though they are not necessary.
+
+2010-11-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix check for read-only fs in mtab update
+
+ * Open /dev/null for write instead of read for redirecting stdout
+ and stderr
+
+ * If umount(8) supports --fake and --no-canonicalize (util-linux-ng
+ version 2.18 or later), and umount(2) supports the
+ UMOUNT_NOFOLLOW flag (linux kernel version 2.6.35 or later) then,
+ "fusermount -u" will call the umount(2) system call and use
+ "umount --fake ..." to update /etc/mtab
+
+ * Added --disable-legacy-umount option to configure. This
+ disables the runtime checking of umount(8) version. When built
+ with this option then "fusermount -u" will fail if umount(8)
+ doesn't support the --fake and --no-canonicalize options.
+
+ * Fix fuse_buf_copy() if already at the end of the buffers
+
+ * Add new ->write_buf() method to low level interface. This
+ allows passig a generic buffer, either containing a memory buffer
+ or a file descriptor. This allows implementing zero copy writes.
+
+ * Add fuse_session_receive_buf() and fuse_session_process_buf()
+ which may be used in event loop implementations to replace
+ fuse_chan_recv() and fuse_session_process() respectively.
+
+ * Remove unnecessary restoring of current working directory in
+ "fusermount -u"
+
+ * Add ctx->pid to debug output
+
+ * Fix st_nlink value in high level lib if file is unlinked but
+ still open
+
+ * libfuse: add store request. Request data to be stored in the
+ kernel buffers for a given inode.
+
+ * libfuse: add retrieve request. Retrieve data stored in the
+ kernel buffers for a given inode.
+
+2010-10-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use LTLIBICONV when linking libfuse. This fixes building against
+ uclibc + libiconv. Patch by Natanael Copa
+
+2010-10-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing argument check in ulockmgr.c to prevent calling
+ ulockmgr_server with illegal arguments. This would cause an ever
+ growing list of ulockmgr_server processes with an endless list of
+ open files which finally exceeds the open file handle limit.
+ Patch by Markus Ammer
+
+2010-09-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix ambiguous symbol version for fuse_chan_new.
+ fuse_versionscript included fuse_chan_new in both FUSE_2.4 and
+ FUSE_2.6. Remove the FUSE_2.4, which is invalid.
+
+2010-09-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix option escaping for fusermount. If the "fsname=" option
+ contained a comma then the option parser in fusermount was
+ confused (Novell bugzilla #641480). Fix by escaping commas when
+ passing them over to fusermount. Reported by Jan Engelhardt
+
+2010-08-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add NetBSD support. Patch from Emmanuel Dreyfus
+
+2010-07-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: add buffer interface. Add a generic buffer interface
+ for use with I/O. Buffer vectors are supplied and each buffer in
+ the vector may be a memory pointer or a file descriptor.
+
+ * The fuse_reply_fd() interface is converted to using buffers.
+
+2010-06-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make the number of max background requests and congestion
+ threshold tunable. New options are "max_background" and
+ "congestion_threshold". Only effective on linux kernel versions
+ 2.6.32 or greater. Patch by Csaba Henk
+
+2010-06-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fuse_reply_fd() reply function to the low level interface.
+ On linux version 2.6.35 or greater this will use splice() to move
+ data directly from a file descriptor to the fuse device without
+ needing to go though a userspace buffer. With the
+ FUSE_REPLY_FD_MOVE flag the kernel will attempt to move the data
+ directly into the filesystem's cache. On earlier kernels it will
+ fall back to an intermediate buffer. The options
+ "no_splice_write" and "no_splice_move" can be used to disable
+ splicing and moving respectively.
+
+2010-06-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix out-of-source build. Patch by Jörg Faschingbauer
+
+ * Add a "nopath" option and flag, indicating that path argument
+ need not be calculated for the following operations: read, write,
+ flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate,
+ fgetattr, lock, ioctl and poll.
+
+2010-05-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove "chmod root" from install of fusermount. Reported by
+ Lucas C. Villa Real
+
+2010-04-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.4
+
+2010-04-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix checking for symlinks in umount from /tmp. Reported by Al
+ Viro
+
+ * Fix umounting if /tmp is a symlink. Reported by Franco Broi
+
+2010-02-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix definition of FUSE_OPT_END for C++. Reported by Tim
+ Bruylants
+
+2010-02-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix stack alignment for clone()
+
+2010-02-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.3
+
+2010-02-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Using "--no-canonicalize" with umount(8) conflicts with the race
+ fix, sinceit assumes the supplied path is absolute, while the race
+ fix relies on the path being relative to the current directory.
+ Reported by Tom Rindborg
+
+2010-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.2
+
+2010-01-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix race if two "fusermount -u" instances are run in parallel.
+ Reported by Dan Rosenberg
+
+ * Make sure that the path to be unmounted doesn't refer to a
+ symlink
+
+2010-01-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compile error on FreeBSD. Patch by Jay Sullivan
+
+2009-12-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use '--no-canonicalize' option of mount(8) (available in
+ util-linux-ng version 2.17 or greater) to avoid calling
+ readling(2) on the newly mounted filesystem before the mount
+ procedure is finished. This has caused a deadlock if "audit" was
+ enabled in the kernel. Also use '--no-canonicalize' for umount to
+ avoid touching the mounted filesystem.
+
+2009-09-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.1
+
+2009-08-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix missing versioned symbol fuse_get_context@FUSE_2.2
+
+2009-08-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.0
+
+2009-08-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing fuse_session_data to versionscript
+
+ * Make sure all global symbols are prefixed with "fuse_" or "cuse_"
+
+2009-07-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clarify how the protocol version should be negotiated between
+ kernel and userspace. Notably libfuse didn't correctly handle the
+ case when the supported major versions didn't match
+
+ * Add missing pthread link for libulockmgr. Patch by Petr Salinger
+
+2009-07-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * The context is extended with a 'umask' field. The umask is sent
+ for mknod, mkdir and create requests by linux kernel version
+ 2.6.31 or later, otherwise the umask is set to zero. Also
+ introduce a new feature flag: FUSE_CAP_DONT_MASK. If the kernel
+ supports this feature, then this flag will be set in conn->capable
+ in the ->init() method. If the filesystem sets this flag in in
+ conn->want, then the create modes will not be masked.
+
+ * Add low level interfaces for lookup cache and attribute
+ invalidation. This feature is available in linux kernels 2.6.31
+ or later. Patch by John Muir
+
+ * Kernel interface version is now 7.12
+
+ * fusermount: Do not silently ignore command line arguments.
+ Patch by Sebastian Harl
+
+2009-06-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.0-pre3
+
+2009-06-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fuse_getgroups (high level lib) and fuse_req_getgroups (low
+ level lib) functions to query the supplementary group IDs for the
+ current request. Currently this is implemented on Linux by
+ reading from the /proc filesystem.
+
+2009-06-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add "noforget" option to high level lib to prevent ESTALE errors
+ on NFS exported filesystems. This result in paths being cached
+ forever, resulting in ever growing memory usage. Use with care.
+
+ * Add "no_remote_lock" option to disable remote file locking even
+ if the filesystem implements it. With this option locking
+ primitives (flock, lockf, fcntl(F_SETLK)) will still work, but
+ will ignore remotely locked files.
+
+ * CUSE patches from Tejun Heo:
+
+ * Unrestricted ioctl support left some debris. Clean them up:
+ o No reason to pass around pointer to flags. Pass flags directly.
+ o Clean up comment and prototype parameter names.
+ o fuse_lib_ioctl() didn't reply when get_path() failed. Fix it.
+ o Remove unused variables {in|out}_iov from fuse_lib_ioctl().
+
+ * Add fuse_reply_ioctl_iov()
+
+ * Move fuse_session, fuse_req and fuse_ll definitions to fuse_i.h
+ and make send_reply_iov() and fuse_setup_common() global (also in
+ fuse_i.h). These will be used by CUSE support.
+
+ * Restructure fuse_ll_process()
+
+ * Implement libfuse side of CUSE support. CUSE uses subset of FUSE
+ operations as dir operations don't make sense for CUSE where one
+ instance implements single character device.
+
+ CUSE support comes with its own cuse_lowevel_ops and related
+ initialization and helper functions. Except for initialization, it
+ usage is basically identical to FUSE.
+
+ This patch also adds example/cusexmp.c which can create a character
+ device with name and device number specified on command line. The
+ created device itself is pretty boring. It's a bit bucket supporting
+ read, write and access via ioctl.
+
+2009-06-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing fuse_reply_bmap to versionscript. Debian
+ Bug#531329. Reported by Goswin Brederlow
+
+2009-05-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't call forget_node() if the lookup was negative and write()
+ for the reply returned ENOENT. Reported by John Haxby
+
+2009-05-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add FUSE_CAP_EXPORT_SUPPORT to fuse_common.h
+
+2009-05-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix missing newlines in some printfs
+
+ * Fix 'make install-strip'. Reported by Dominick Layfield
+
+2009-01-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.0-pre2
+
+2008-12-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Implement poll support. Patch by Tejun Heo
+
+ * Add missing setattr flags to <fuse_lowlevel.h>.
+
+ * Only pass valid flags to ->setattr().
+
+2008-12-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Implement ioctl support. On high level interface only
+ "restricted" ioctls are supported (which are defined with the
+ _IO(), _IOR(), _IOW() or _IOWR() macros). Unrestricted ioctls
+ will only be allwed to CUSE (Character Device in Userspace)
+ servers. Patch by Tejun Heo
+
+2008-11-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * If open sets fi->nonseekable, libfuse will tell the kernel that
+ the file is not seekable. Patch by Tejun Heo
+
+2008-11-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lowlevel lib: fix deadlock if fuse_reply_* is called from the
+ interrupt handling function. Reported by Tero Marttila
+
+2008-10-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Allow commas in options to be escaped with a backslash
+
+ * Add new function: fuse_opt_add_opt_escaped()
+
+ * Add missing fuse_reply_bmap() to the version script
+
+2008-10-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Pass current file flags to read and write operations
+
+2008-07-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clean up debug output in highlevel lib
+
+2008-07-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.8.0-pre1
+
+2008-06-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix handling of (no)suid and (no)dev options if filesystem is
+ mounted from /etc/fstab or via mount(8). Reported by Jan Ondrej.
+
+ * Skip calling mount(8) if /etc/mtab doesn't exist or if it's on a
+ read-only filesystem. This works around issues with certain mount
+ implementations. Reported by Szabolcs Szakacsits.
+
+2008-06-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove fuse kernel module sources. Linux 2.6.27 will support
+ NFS exporting.
+
+2008-06-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix theoretical infinite loops in libfuse. Reported by Szabolcs
+ Szakacsits
+
+ * Fix missing <sys/param.h> include for PATH_MAX. Reported by
+ Szabolcs Szakacsits
+
+2008-05-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix mounting over symlink. Reported by Szabolcs Szakacsits
+
+2008-05-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't allow bigger than 4kB writes by default on 2.6.26 and
+ later kernels, so that filesystems not expecting this are not
+ broken on a kernel upgrade. Provide a 'big_writes' mount option
+ to enable this feature. In future API revisions this may become
+ the default.
+
+2008-04-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Update warning message for missing newline at end of fuse.conf
+
+ * Update debug message for successful operation to not include the
+ string "error:"
+
+2008-04-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Update error message for missing mountpoint parameter. Reported
+ by Allen Pulsifer
+
+2008-04-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Print library version information to debug output
+
+ * Highlevel lib: don't limit paths to 4095 characters
+
+2008-03-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix memory leaks on mount. Patch by Szabolcs Szakacsits
+
+2008-03-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix missing pthread_mutex_destroy in error path of
+ fuse_lib_opendir(). Patch by Szabolcs Szakacsits
+
+2008-03-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add queuing on contention to per-node lock algorithm, to avoid
+ starvation.
+
+ * Only enable cancelation when reading a request, otherwise
+ cancellation could happen with a mutex held, which could hang the
+ process on umount
+
+2008-02-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Block SIGCHLD when executing mount and umount
+
+ * fusexmp_fh: avoid unnecessary seeking in readdir
+
+ * Update kernel interface to 7.9:
+
+ * Support receiving file handle from kernel in GETATTR request
+
+ * Allow operations with a NULL path argument, if the filesystem
+ supports it
+
+ * Add support atomic open(O_TRUNC)
+
+ * Support the st_blksize field in struct stat
+
+ * If the "FUSE_THREAD_STACK" environment is set, initialize the
+ stack size of threads by this value. Patch by Florin Malita
+
+ * Add per-node locking, instead of a global tree lock to protect
+ the path from changing during operations. Original patch by
+ Rodrigo Castro
+
+2008-02-03 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib/mount_bsd.c:
+ - string formatting fixes
+ - exit if mounting has failed
+ (in FreeBSD a mount failure is not critical per se, as the daemon
+ still could be mounted externally, but waiting for such an event
+ is more confusing than fruitful)
+ - ditch the kvm(8) stuff and simply use forced unmount which just
+ won't block
+ - prettify option specifications
+ - add "-onosync_unmount" kernel option
+
+2008-01-07 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib/mount_bsd.c:
+ - refine device closing in a race-free way
+ - add support for "-osubtype" on FreeBSD
+
+ * makeconf.sh: make it work under FreeBSD
+
+2008-01-03 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib/mount_bsd.c: close device before unmount
+ (cf. lib/mount.c rev. 1.43) and fix some warnings
+
+2007-12-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix './configure --disable-static'. Patch from Ismail Dönmez
+
+2007-12-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.7.2
+
+2007-12-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix kernel module compile for 2.6.24
+
+ * Invalidate attributes of parent directory after create(), since
+ the modification time changes. Invalidate attributes on rename,
+ since some filesystems may update st_ctime. Reported by Szabolcs
+ Szakacsits
+
+ * Fix NFS exporting to handle 64bit node IDs
+
+ * Disable old symbol versions if __UCLIBC__ is defined. If a
+ symbol in a library has multiple versions, the runtime linker in
+ uClibc seems to randomly choose between them.
+
+ * Remove erroneous 'fuse_opt_insert_arg@FUSE_2_5' from
+ fuse_version_script. fuse_opt_free_args() was added in fuse-2.6.
+
+ * Close fuse device file descriptor before calling umount(),
+ preventing a deadlock when umount is synchronous. Reported by
+ Szabolcs Szakacsits
+
+2007-11-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * 'fusermount -u' did not umount the filesystem if /etc/mtab was a
+ symlink. This bug was introduced in 2.7.1 by "Don't call
+ /bin/[u]mount if /etc/mtab is a symlink". Found by robertsong.
+
+2007-10-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.7.1
+
+2007-10-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clarify licence version to be "LGPLv2" for the library
+
+ * kernel fixes:
+
+ * After mount set nlink attribute for the root inode to 1
+
+ * Fix wake up of task waiting for a reserved request
+
+ * Fix allowing setattr, listxattr and statfs for other users
+
+2007-09-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing context initialization in fuse_fs_chmod(). Bug
+ found by "iohead"
+
+ * Fix kernel module compilation for 2.6.23. Based on patch by
+ Marian Marinov
+
+2007-09-04 Philippe Elie <phil.el@wanadoo.fr>
+
+ * lib/fuse_lowlevel.c: fix a fuse_req leak in do_forget()
+
+2007-07-31 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Work around hotplug issue, that it calls filesystem with file
+ descriptors 0, 1 and 2 not open. Tracked down by Leif Johnson
+
+2007-07-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't call /bin/[u]mount if /etc/mtab is a symlink. Reported by
+ Tomas M
+
+ * Also don't touch /etc/mtab if it is within the mounted
+ filesystem. Suggested by Jeffrey Law
+
+2007-07-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Reset args->argc in fuse_opt_free_args(). Patch by Lucas
+ C. Villa Real
+
+2007-07-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.7.0
+
+2007-07-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Accept a NULL "op" for fuse_main(), etc. This is useful if
+ filesystem is only invoking fuse to print a help message, or
+ version. Fixes RedHat bugzilla #217343
+
+2007-06-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: fix locking when loading a filesystem module
+
+2007-06-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fs subtype support to mount.fuse
+
+2007-06-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fs subtype support to libfuse and fusermount
+
+2007-06-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: sync with mainline (2.6.22)
+
+2007-06-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Send debug output to stderr instead of stdout. Patch by Jan
+ Engelhardt
+
+2007-06-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libulockmgr: Work around a kernel bug in recv(), causing it to
+ sometimes return zero even if data was available on the socket.
+
+2007-05-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: optimization: store parent pointer in node instead of
+ parent id
+
+2007-05-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: don't create new thread for each FORGET request. FORGET
+ messages sometimes caused so many threads to be created, that
+ process virtual memory space ran out. Reported by Chris AtLee
+
+2007-05-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: fix memory leak on thread creation failure in multithreaded
+ event loop. Found by Chris AtLee
+
+2007-05-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lowlevel lib: add fuse_reply_iov function, which is similar to
+ fuse_reply_buf, but accepts a vector of buffers. Patch by Roger
+ Willcocks
+
+2007-05-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix Oops or error if a regular file is created with mknod(2) on
+ a fuse filesystem. Kernels 2.6.18 onward are affected. Thanks to
+ J. Cameijo Cerdeira for the report
+
+2007-05-11 Csaba Henk <csaba.henk@creo.hu>
+
+ * libfuse: fix return value of fuse_loop()/fuse_loop_mt().
+ Error reported by Csaba Henk, fix by Miklos Szeredi
+
+ * libfuse: fix unlock in flush
+
+ * libfuse: do unlocking on RELEASE+FLUSH
+
+2007-05-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.7.0-rc1
+
+2007-05-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: sync with mainline:
+
+ * Use invalidate_mapping_pages() if available
+
+ * Fix BUG when invalid file type is supplied in mount. Patch by
+ Timo Savola
+
+2007-04-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: call umount(8) directly instead of fusermount if
+ possible
+
+ * Clean up init script, make it LSB compliant
+
+2007-04-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * In multithreaded loop, use a semaphore instead of SIGHUP to wake
+ up the main thread on umount. This is more elegant, and works
+ even if signals are blocked.
+
+2007-04-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Improve mounting support in libfuse:
+ - check non-empty mountpoint
+ - only fall back to fusermount when necessary
+
+2007-04-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't chdir to "/" in foreground mode, it causes more trouble
+ than it's worth
+
+2007-04-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Replace utils/mount.fuse "sh" script with a "C" program
+
+2007-04-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -lulockmgr to compilation comment in fusexmp_fh.c
+
+2007-04-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check for iconv. Patch by Csaba Henk
+
+ * Add direct umounting
+
+ * Use "fusectl" as the device for the fusectl filesystem. Debian
+ Bug#417945. Reported by Laurent Bonnaud
+
+2007-04-01 Csaba Henk <csaba.henk@creo.hu>
+
+ * Fix some FreeBSD related macros.
+
+2007-03-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add support for direct mounting by libfuse. Fall back on
+ calling fusermount if it doesn't work
+
+2007-03-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.7.0-pre1
+
+2007-03-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Correctly handle O_APPEND in direct IO mode. Reported by Greg
+ Bruno
+
+ * mount.fuse should use /bin/bash. Debian Bug#413403. Reported
+ by Thomas Weinbrenner
+
+2007-02-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix detection of installed fuse in init script. Reported and
+ fix suggested by Davide Canova
+
+2007-02-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix 2.6.9 RHEL kernels, which have compatibility mutex.h, but
+ don't define mutex_destroy(), bummer. Patch from Phil Schwan
+
+2007-02-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Compile fuseblk for kernels which don't have an option to turn
+ off the block layer (CONFIG_BLOCK). Reported by Szakacsits
+ Szabolcs
+
+2007-02-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add filesystem stacking support to high level API. Filesystem
+ modules can be built into libfuse or loaded from shared object
+ (.so) files
+
+ * Add 'subdir' and 'iconv' built in modules
+
+ * lib/fuse.c: Fix locking for the reply code in create and open
+
+2007-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: make it compile on "strange" kernels which have emulated
+ mutexes via <linux/mutex.h> but no i_mutex. Reported by Tomasz
+ Mateja
+
+2007-01-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix BUG in control filesystem if it is umounted and
+ mounted again, while some fuse filesystems are present.
+ Bugreport from Florent Mertens
+
+ * kernel: sync with mainline, support 2.6.20
+
+2007-01-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib/Makefile.am: actually link libfuse against libfuse_libs
+
+2007-01-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Build fix for 2.6.16 vanila and 2.6.15 FC5 kernels. Patch from
+ Ian Abbott
+
+2007-01-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix abort in fuse_new() compatibility API for opts == NULL case.
+ Novell bugzilla #233870. Patch from Takashi Iwai.
+
+2007-01-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix option parsing in mount.fuse. Patch from Jens M. Noedler
+
+2007-01-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix unaligned access in file desctriptor passing in libfuse,
+ fusermount and ulockmgr. Debian bug ID: 404904. Reported and
+ tested by Sebastian Fontius
+
+2006-12-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: don't keep unreferenced inodes in the icache.
+
+2006-12-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: Fix detection of fuseblk. Reported by Szakacsits
+ Szabolcs
+
+ * lib: Fix use after free in fuse_flush(). Reported by Ron
+ Lindman
+
+2006-12-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * mount.fuse: add "setuid=USER" option which does a "su - USER"
+ for the filesystem
+
+ * fusermount: use "/bin/mount -f" to add entry to /etc/mtab, and
+ "/bin/umount" to remove entry from /etc/mtab. This gets rid of
+ the ugly code dealing with mtab, as well as a possible race
+ between fusermount and mount trying to modify /etc/mtab at the
+ same time
+
+ * Fix "buffer size too small: 4" warning for users of the
+ fuse_loop_mt_proc() function.
+
+2006-12-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix warnings with gcc-4.1 on 64bit archs. Report from
+ Harshavardhana
+
+ * Add extra warning options, and fix resulting warnings
+
+ * Really fix fuse_teardown problem
+
+2006-12-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -lrt to fuse.pc (if needed) to fix static linking against
+ libfuse. Reported by Szakacsits Szabolcs
+
+2006-12-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.1
+
+2006-11-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix API version 21 and 22 compatibility for fuse_teardown.
+ Reported by Bgs
+
+2006-11-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: Print a more helpful message in case the kernel
+ doesn't support the 'fuseblk' filesystem type. This has been
+ biting ntfs-3g users. Reported by Yura Pakhuchiy
+
+ * kernel: fix build problem for "make -C ...". Reported by
+ Stephen Bryant
+
+2006-11-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in certain error paths of lookup routines. The request
+ object was reused for sending FORGET, which is illegal. This bug
+ could cause an Oops in linux-2.6.18 or in fuse-2.6.0, and might
+ silently corrupt memory in earlier versions. Report and test
+ program by Russ Cox
+
+2006-11-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Print an error if an incompatible kernel interface version is
+ detected in INIT. This will only show if filesystem is started
+ with -d or -f
+
+ * Fix order of fuse_destroy()/fuse_unmount() in error cleanup of
+ fuse_setup_common(). Reported by Szakacsits Szabolcs
+
+2006-11-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix recursive locking in fuse_create(). Thanks to Takuya
+ Ishibashi for the bug report
+
+2006-10-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix automake problem. Patch from Nix
+
+2006-10-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix mount.fuse to use /bin/sh instead of /bin/bash, which is not
+ always available on embedded systems. Patch from Paul Smith
+
+ * Fix util/Makefile.am, so that failure to run update-rc.d or
+ device creation doesn't cause make to fail. Reported by Paul
+ Smith
+
+2006-10-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0
+
+2006-10-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: don't try to create a lock file if /etc/mtab is a
+ symlink. Report and patch from Alexei Sheplyakov (debian bug
+ #393693)
+
+2006-10-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Minor changes, sync with mainline tree
+
+2006-10-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-rc3
+
+2006-10-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: cleanups
+
+2006-10-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: Fix compilation on patched 2.6.18 (fc6) and 2.6.19.
+ Report from David Shaw
+
+ * lib: Fix lost error on renaming a file. Report from David Shaw
+
+ * lib: Fix lost error on hiding open files (renaming to
+ .fuse_hiddenXXXX)
+
+ * kernel: Fix a rare hang on SMP/32bit on heavy filesystem
+ activity. The cause of the bug was that some calls to
+ i_size_write() were not protected by a lock, and hence
+ i_size_seqcount could become corrupted. This caused subsequent
+ calls to i_size_read() to spin forever. This is a long standing
+ bug was probably introduced in version 2.2, and thought to be
+ related to NFS exporting (it's not). It was reported by various
+ people, but Dana Henriksen has finally helped me to track it down,
+ so big thanks to him
+
+ * kernel: Protect against truncation of a swapfile
+
+2006-10-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: Check for signature of super_operations->umount_begin().
+ Ubuntu kernel 2.6.17 seems to use the new signature found in
+ 2.6.18. Thanks to Florent Mertens for the report
+
+2006-10-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make sure inode numers wrap around at 2^32. This is needed on
+ dual 64bit/32bit architectures, because 32bit applications using
+ the non-largefile interface would otherwise break (EOVERFLOW error
+ would be returned by the stat() system call family)
+
+ * ulockmgr: handle the case, when a locking operation fails
+ because no more file desctriptors are available in
+ ulockmgr_server. Also work around a Linux kernel bug (known to
+ exist for all Linux kernel versions <= 2.6.18) which may cause
+ sent file descriptors to be lost in the above case
+
+ * ulockmgr: optimize file descriptor use
+
+ * restore needed cpp flags to util/Makefile.am
+
+ * Install udev rules as 99-fuse.rules instead of 60-fuse.rules
+
+ * Minor clean up of udev rules
+
+ * Add a synchronous DESTROY message to kernel interface. This is
+ invoked from umount, when the final instance of the filesystem is
+ released. It is only sent for filesystems mounted with the
+ 'blkdev' option for security reasons.
+
+ * If the DESTROY message is received, call the filesystem's
+ ->destroy() method. In this case it's not called from session
+ destruction as it would be otherwise.
+
+2006-10-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-rc2
+
+2006-10-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add support for FLUSH+RELEASE operation for FreeBSD. Original
+ patch by Csaba Henk
+
+ * Add init script to insert fuse module and mount the control
+ filesystem. The script is installed as /etc/init.d/fuse and on
+ debian based systems (where update-rc.d is available) symlinks
+ from /etc/rc*.d/ are also installed.
+
+ * Include '#define FUSE_USE_VERSION=XX' into examples so they
+ become more self contained.
+
+2006-09-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * API changes:
+
+ * Move lock_owner from a separate argument into fuse_file_info
+
+ * Add a flag to fuse_file_info indicating (1) a highlevel lock
+ operation (unlock all) was initiated by a flush, (2) a lowlevel
+ release operation should perform a flush as well.
+
+ * fusermount: revert modprobe change (2006-08-18) since it
+ doesn't work reliably with udev
+
+ * Add support for block device backed filesystems. This mode is
+ selected with the 'blkdev' option, which is privileged.
+
+ * Add support for the bmap (FIBMAP ioctl) operation on block
+ device backed filesystems. This allows swapon and lilo to work on
+ such filesystems.
+
+ * kernel changes:
+
+ * Drop support for kernels earlier than 2.6.9. Kernel module from
+ previous (2.5.x) release can be used with library from this
+ release
+
+ * In fuse_dentry_revalidate() use dget_parent() instead of
+ dereferencing d_parent, since there's no protection against parent
+ changing and going away
+
+ * Protect nlookup from concurrent updates
+
+ * In lookup if a directory alias exists but is unused,
+ then get rid of it, otherwise return -EBUSY.
+
+ * In mkdir if a directory alias exists, return success, but leave
+ dentry negative. In reality this could happen if a remote rename
+ immediately followed the mkdir.
+
+ * Don't BUG in fuse_iget() if multiple retries are needed to get a
+ good inode. This could happen if several lookups are racing for
+ the same inode.
+
+2006-09-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compilation on 2.6.9. Report from Troy Ayers
+
+2006-09-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix Oops in fuse_readpages(). Reported by David Shaw
+
+2006-09-24 Csaba Henk <csaba.henk@creo.hu>
+
+ * Add support for nanosec times on FreeBSD
+
+ * Fix FreeBSD compatibility issues
+
+2006-09-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix one more compatibility bug. Thanks to Ricardo Correia
+
+ * Fix utimens compilation with uClibc. Patch from Jamie Guinan
+
+2006-09-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fixed several compatibility bugs in low level interface.
+ Reported by Ricardo Correia
+
+ * Add workaround for ARM caching bug
+
+2006-09-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Rename new utimes() method to more logical utimens()
+
+2006-09-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fuse tried to unlink already unlinked hidden files. Bug
+ reported by Milan Svoboda
+
+2006-09-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-rc1
+
+2006-09-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: Fix unlock on close for kernels < 2.6.18
+
+ * Add ulockmgr library & server. This can be used for handling
+ file locking requests either directly from libfuse or over a
+ network, etc. This first version is not optimized and the number
+ of file descriptors it uses may get out of hand
+
+2006-09-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: Add interrupt support to high level library, which may be
+ enabled with the 'intr' mount option.
+
+ * When an operation is interrupted the thread handling that
+ operation will receive SIGUSR1 (or other signal specified with the
+ 'intr_signal=N' option). The library installs a no-op signal
+ handler for this signal, unless there's already a handler
+ installed.
+
+ * The filesystem may query interrupt status (regardless of 'intr')
+ with the fuse_interrupted() function.
+
+ * mount.fuse: initialize $HOME if not set. Report from Sven Goldt
+
+2006-09-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: Multithreaded loop now allows unlimited number of threads.
+ This is needed for locking operations which may block
+ indefinitely. Also the kernel now doesn't limit the number of
+ outstanding requests so the library shouldn't do so either.
+
+2006-09-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix recursive lock bug in interrupt handling
+
+ * Add utimes() method to highlevel interface, which supports
+ setting times with nanosecond resolution
+
+2006-08-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix page leak if fuse_readpages() failed in it's
+ initialization. Bug found and original patch from Alexander
+ Zarochentsev
+
+ * For linux kernels >=2.6.18 (2.6.19 if using the fuse module from
+ the kernel tree) the statfs method will receive the path within
+ the filesystem on which the stat(v)fs syscall was called
+
+ * fusermount: try to modprobe fuse module if invoked by root and
+ unable to open device. This is needed with udev, since the device
+ node will be created only when the module is inserted, hence
+ module autoloading won't work. Reported by Szakacsits Szabolcs
+
+2006-07-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: if selinux is active, restore the original file's
+ security context in unmount_rename(). Redhat bugzilla id 188561.
+ Patch from Yves Perrenoud
+
+ * Add POSIX file locking operation to high level library
+
+ * Initialize context for unlink of hidden files on umount. Bug
+ reported by Tim Stoakes
+
+2006-07-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Multiple release() calls can race with each other, resulting in
+ the hidden file being deleted before the last release finishes.
+ Bug found and patch tested by Mark Huijgen
+
+2006-07-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: if /dev/fuse doesn't exist, suggest modprobing fuse;
+ this makes sense on systems using udev. Reported by Szakacsits
+ Szabolcs
+
+2006-06-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-pre3
+
+2006-06-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Support in kernel module for file locking and interruption. The
+ same functionality is available in official kernels >= 2.6.18
+
+2006-06-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add POSIX file locking support
+
+ * Add request interruption
+
+2006-06-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing pthread_rwlock_destroy(). Patch from Remy Blank
+
+2006-06-05 Remy Blank <remy.blank@pobox.com>
+
+ * lib: canonicalize mount point in fuse_helper_opt_proc() so that
+ unmounting succeeds even if mount point was relative.
+
+2006-06-04 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib: fix emergency umount in helper.c when malloc fails.
+ (The way it was done would end up in a segfault.)
+
+2006-06-01 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib: adjust threading related compiler flags.
+ Switch to "-pthread" from "-lpthread" as that's the preferred
+ one on several platforms. Consulted with Terrence Cole and
+ Miklos Szeredi
+
+2006-05-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: search fusermount in installation directory (bindir) as
+ well as in PATH.
+
+2006-05-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: fix compilation if CLOCK_MONOTONIC is not defined.
+ Reported by Christian Magnusson
+
+2006-04-23 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib: make FreeBSD mount routine recognize if kernel features
+ backgrounded init and if it does, run the mount util in foreground
+ (similarly to Linux)
+
+2006-04-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix fput deadlock fix, the lockless solution could lead
+ to "VFS: busy inodes after umount..."
+
+ * kernel: fix race between checking and setting file->private_data
+ for the device. Found by Al Viro
+
+2006-04-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: remove request pool, instead allocate requests on
+ demand. Account the number of background requests, and if they go
+ over a limit, block the allocation of new requests.
+
+ * kernel: fix deadlock if backgrounded request holds the last
+ reference to the super block
+
+ * kernel: don't use fuse_reset_request() during direct I/O
+
+2006-04-06 Csaba Henk <csaba.henk@creo.hu>
+
+ * lib: Let FreeBSD mount option parsing routine recognize "no"
+ prefixes for FUSE specific options as well
+
+2006-04-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: Add missing rwlock initialization. Patch by Ryan Bradetich
+
+2006-03-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * API changes:
+
+ * fuse_main(), fuse_setup() and fuse_new() have an additionl
+ user_data parameter
+
+ * fuse_mount() returns a 'struct fuse_chan' pointer instead of a
+ file descriptor
+
+ * fuse_unmount() receives a 'struct fuse_chan' pointer. It
+ destroys the given channel
+
+ * fuse_teardown() no longer has a file descriptor parameter
+
+ * new exported functions: fuse_session_remove_chan(),
+ fuse_get_session(), fuse_daemonize()
+
+ * fuse_chan_recv() may now return a new channel which will be used
+ to send the reply
+
+2006-03-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-pre2
+
+2006-03-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't unmount if already unmounted. This fixes a problem seen
+ in the following situation: Lazy unmount a busy filesystem; Mount
+ a new one in top; When the first finally unmounts, the second also
+ unmounts. Reported by Franco Broi
+
+2006-03-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lowlevel lib: use indirect function calls instead of a
+ switch/case construct. Besides increased efficiency it helps
+ maintainability & readability too. Patch from Florin Malita
+
+2006-03-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: replace global spinlock with a per-connection spinlock
+
+2006-03-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix source compatibility breakage for fuse_unmount(). Report
+ from Yura Pakhuchiy
+
+2006-03-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix O_ASYNC handling in fuse_dev_release(). From Jeff Dike
+
+2006-03-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add O_ASYNC and O_NONBLOCK support to FUSE device. Patch by
+ Jeff Dike
+
+ * Renamed fuse_chan_receive() to fuse_chan_recv() and changed
+ interface to return -errno in case of error.
+
+2006-03-01 Csaba Henk <csaba.henk@creo.hu>
+
+ * libfuse: pass device file descriptor to fuse_unmount(), rewrite
+ FreeBSD implementation so that it uses libc (sysctl backed) instead
+ of an embdedded script (kmem backed). Adjust the control flow of
+ hello_ll so that device doesn't get closed before unmount attempt.
+
+2006-02-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Lowlevel lib: return all-zero statvfs data if filesystem doesn't
+ implement method. This is needed on FreeBSD, and nicer on Linux
+ too. Highlevel lib already did this. Reported by Csaba Henk
+
+ * Fix negative entry handling. There was a bug, that negative
+ lookups with timeouts (nodeid == 0) returned -EIO.
+
+2006-02-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix race between RELEASE and UNLINK, which might leave
+ .fuse_hidden* files around
+
+2006-02-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusexmp_fh: implement flush() method and call close() on the
+ open file descriptor. This is needed if used on an NFS
+ filesystem, which buffers data until file is closed. Franco Broi
+ spotted the situation when 'cp -p' failed to set the modification
+ time because of this.
+
+2006-02-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.0-pre1
+
+2006-02-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix use-after-free bug in interruptred reply_entry().
+ Patch from John Muir
+
+ * libfuse: fix wrong symbol versioning for fuse_mount. Debian bug
+ ID: 352631. Found by Stéphane Rosi
+
+2006-02-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Lowlevel lib: Unify fuse_dirent_size() and fuse_add_dirent()
+ into a single function fuse_add_direntry(). This cleans up the
+ interface and makes it possible to do stacking.
+
+2006-02-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix rare race betweeen abort and release caused by failed iget()
+ in fuse_create_open().
+
+ * Add 'ac_attr_timeout' option e.g. for filesystems which do their
+ own attribute caching.
+
+2006-02-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Work around FreeBSD runtime linker "feature" which binds an old
+ version of a symbol to internal references if the symbol has more
+ than one version. This resulted in infinite recursion in
+ fuse_lowlevel_new_compat25().
+
+2006-02-10 Csaba Henk <csaba.henk@creo.hu>
+
+ * Refine clock_gettime() querying so that linker options
+ shall be set as it's appropriate for the target platform.
+
+2006-02-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix udev rule syntax. Reported by Nix
+
+2006-02-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * In some cases udev rule seems to be ineffective when installed
+ as 40-fuse.rules but work as 60-fuse.rules. Reported by John Hunt
+
+2006-02-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compilation when build directory is different from source
+ directory. Reported by Frédéric L. W. Meunier
+
+2006-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix even bigger bug introduced in fix for request_end() on
+ 2006-01-14. Reported by Gal Rosen
+
+2006-01-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * highlevel-lib: add 'auto_cache' option. This caches file data
+ based on modification time and size
+
+2006-01-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Sanitize storage type and help message in mount_bsd.c. Patch
+ from Csaba Henk
+
+ * fuse_opt: add new helper constants FUSE_OPT_KEY_KEEP and
+ FUSE_OPT_KEY_DISCARD
+
+ * Add options 'max_readahead', 'sync_read' and 'async_read'
+
+ * Kernel ABI version 7.6:
+
+ * Negotiate the 'max_readahead' value and 'async_read' flags with
+ userspace in the INIT method
+
+ * Add connection info to ->init() methods to both lowlevel and
+ highlevel API
+
+ * Fall back to synchronous read() behavior if either library or
+ userspace filesystem is using the old interface version. This is
+ needed so non-updated filesystems won't be confused by the
+ different read() behavior
+
+2006-01-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: if "fsname=" option was given, pass it to fusermount
+
+ * fuse_opt: add new fuse_opt_insert_arg() function, which is
+ needed by filesystems to implement some argument manipulations
+ correctly
+
+ * fuse_opt: fix memory leak in handling "--" option
+
+2006-01-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix detection of case when fuse is not configured into
+ the kernel either as module or built-in
+
+ * fuse_opt.h: fix incompatibility with C++ compilers by renaming
+ 'template' structure member to 'templ'. Reported by Takashi Iwai
+
+ * fuse.h: fix compatibility bugs. Patch by Yura Pakhuchiy
+
+ * kernel: support version 2.6.16 (i_sem -> i_mutex)
+
+2006-01-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added (again) asynchronous readpages support
+
+ * Each connection now shows up under /sys/fs/fuse/connections
+
+ * Connection attributes exported to sysfs: 'waiting' number of
+ waiting requests; 'abort' abort the connection
+
+ * Connection may be aborted through either the sysfs interface or
+ with 'umount -f mountpoint'
+
+2006-01-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.5.0
+
+2006-01-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix a couple of bugs
+
+ * Order of request_end() and fuse_copy_finish() was wrong.
+ Posthumous note: Franco Broi managed to exploit this, though it
+ seemed quite impossible
+
+ * request_end() used request pointer after decrementing refcount
+
+ * Clearing ->connected or ->mounted connection flags could race
+ with setting other bitfields not protected with a lock
+
+2006-01-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: add necessary compile flags for 2.4.X/x86_64.
+ Report from Sean Ziegeler
+
+2006-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.5.0-pre2
+
+2006-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Applied patch from Csaba Henk, to update mount_bsd to new
+ fuse_mount() semantics
+
+ * Ignore auto,noauto,... options in mount.fuse. Reported by Frank
+ Steiner and Don Taber
+
+ * fusermount: add 'dirsync' mount option
+
+2006-01-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Improved help reporting and added version reporting to library
+
+2006-01-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change working directory to "/" even if running in the
+ foreground. Patch from Jonathan Brandmeyer
+
+ * Changed lots of functions to use 'struct fuse_args' instead of
+ separate argc and argv
+
+ * Added fuse_parse_cmdline(), fuse_set_signal_handlers() and
+ fuse_remove_signal_handlers() functions, so that it's now pretty
+ easy to get all the functionality of fuse_main() with a filesystem
+ using the lowlevel API.
+
+2006-01-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * mount.fuse: the 'user' option should be ignored. Report and
+ solution from Mattd.
+
+ * mount.fuse: export PATH in the right place. Report and patch
+ from Hannes Schweizer
+
+2005-12-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clean up the option parsing interface slightly, by creating an
+ "argument list" structure, that contains the argument vector and
+ count
+
+2005-12-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: check if /mnt/mtab is a symlink and don't modify it
+ in that case
+
+ * kernel: simplify request size limiting. INIT only contains
+ maximum write size, maximum path component size remains fixed at
+ 1024 bytes, and maximum xattr size depends on read buffer.
+
+2005-12-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix readdir() failure on x86_64, of 32bit programs compiled
+ without largefile support. Bug report and help from Anthony
+ Kolasny
+
+ * If lookup returns invalid mode, return -EIO instead of creating
+ a regular file
+
+ * Add current output argument vector to option processing
+ function
+
+2005-12-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix stale code in ifdef FreeBSD. Patch from Csaba Henk
+
+2005-12-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.5.0-pre1
+
+2005-12-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: added option parsing interface, defined in
+ <fuse_opt.h>.
+
+2005-12-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Return EIO for file operations (read, write, fsync, flush) on
+ open files whose inode has become "bad". Inodes will be marked
+ "bad" if their type changes. Bug report by Csaba Henk
+
+2005-12-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use bigger request buffer size. write() did not work on archs
+ with > 4k page size, Bug report by Mark Haney
+
+ * ABI version 7.5:
+
+ * Extend INIT reply with data size limits
+
+2005-12-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix memory leak in fuse_read_cmd()/fuse_process_cmd(). Bug
+ reported by Vincenzo Ciancia
+
+ * Handle exit-by-umount in fuse_read_cmd()
+
+2005-11-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check if '-msoft-float' option is supported by compiler when
+ configuring for a 2.4.x kernel. Bug report by Mark Haney
+
+ * In multithreaded loop send a TERM signal to the main thread if
+ one of the other threads exit. Needed on FreeBSD for a clean exit
+ on umount. Should not cause any harm on Linux either
+
+2005-11-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in 32-bit file handle compatibility
+
+2005-11-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Block TERM, INT, HUP and QUIT signals in all but the main
+ thread. According to POSIX it's not specified which thread will
+ receive these signals.
+
+ * Kernel changes:
+
+ * Check for directory aliasing on mkdir, not just on lookup
+
+ * Check for special node ID values in create+open operation
+
+ * Sync with -mm: readv, writev, aio_read and aio_write methods
+ added to file operations
+
+ * Cleanups: lookup code, page offset calculation
+
+ * ABI stepped to 7.4, changes:
+
+ * frsize member added to fuse_kstatfs structure
+
+ * added support for negative entry caching: on lowlevel API if
+ fuse_entry_param::ino is set to zero in reply to a lookup request,
+ the kernel will cache the dentry for the specified amount of time.
+
+ * libfuse: added 'negative_timeout' option: specifies how much
+ negative entries should be cached. Default is zero, to be
+ compatible with prior versions
+
+2005-11-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add detection of mainline FUSE code in running kernel
+
+2005-11-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't use async cancelation in multithreaded loop. This makes
+ it more portable to systems where read() is not async cancel safe.
+ Report from Andriy Gapon
+
+2005-11-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Warn if API version 11 compatibility is requested
+
+2005-11-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * More FreeBSD merge
+
+ * fusermount: don't allow mountpoints with '\n', '\t', or '\\' in
+ them, because it corrupts /etc/mtab. Found by Thomas Biege
+ CVE-2005-3531
+
+ * libfuse: don't use system() to invoke 'fusermount -u ...'
+ because it breaks mountpoints with spaces in them into multiple
+ arguments
+
+2005-11-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Merge library part of FreeBSD port. Patch by Csaba Henk
+
+2005-11-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use 64bit type for file handle, so the full range supported by
+ the kernel interface is available to applications
+
+2005-11-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Moved mountpoint argument checking from fuse_parse_cmdline() to
+ fuse_mount() in preparation to FreeBSD merge.
+
+2005-11-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove unneeded close() from fuse_teardown(). Spotted by Csaba
+ Henk.
+
+2005-11-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make the statfs change backwards compatible.
+
+2005-11-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change ->statfs() method to use 'struct statvfs' instead of
+ 'struct statfs'. This makes the API more portable since statvfs()
+ is defined by POSIX.
+
+2005-10-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fgetattr() method, which currently will only be called after
+ a successful call to a create() method.
+
+2005-10-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change kernel ABI version to 7.3
+
+ * Add ACCESS operation. This is called from the access() system
+ call if 'default_permissions' mount option is not given, and is
+ not called on kernels 2.4.*
+
+ * Add atomic CREATE+OPEN operation. This will only work with
+ 2.6.15 (presumably) or later Linux kernels.
+
+ * Add ftruncate() method. This will only work with 2.6.15
+ (presumably) or later Linux kernels.
+
+ * Fix kernel module compile if kernel source and build directories
+ differ. Report and initial patch by John Eastman
+
+2005-10-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: optimize buffer reallocation in fill_dir.
+
+2005-10-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.4.1
+
+2005-10-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: add debug for write result (by Shaun Jackman) and
+ warnings for too large read/write result
+
+2005-10-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Spelling fixes, thanks to Ioannis Barkas
+
+2005-10-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fuse_common.h: use extern "C". Thanks to Valient Gough for the
+ patch
+
+2005-10-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * highlevel-lib: init() and destroy() methods didn't have an
+ initialized fuse_context. Bug reported by Tim Stoakes
+
+2005-10-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.4.0
+
+2005-10-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add documentation to fuse_lowlevel.h
+
+ * API cleanups:
+
+ * Remove definitions of unused FATTR_CTIME / FUSE_SET_ATTR_CTIME
+
+ * Move fuse_mount() and fuse_unmount() to fuse_common.h
+
+ * Change the return type of fuse_reply_none() from int to void.
+
+2005-09-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: NFS exporting leaked dentries. Bug found and fixed by
+ Akshat Aranya.
+
+2005-09-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: fix error message, when unable to open /dev/fuse.
+ Report by Balázs Pozsár
+
+2005-09-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * UClibc fixes from Christian Magnusson
+
+2005-09-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added NAME="%k" to util/udev.rules. Fix by Mattias Wadman.
+
+2005-09-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.4.0-rc1
+
+2005-09-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: allow user umount in the case when /etc/mtab is a
+ symlink to /proc/mounts. Reported by Balázs Pozsár.
+
+2005-09-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check for special node ID values in lookup and creation
+
+2005-09-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Slight optimization in returning EINVAL error in case of an open
+ with O_DIRECT flag.
+
+2005-09-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove '--enable-auto-modprobe' configure flag. Module
+ auto-loading is now handled by the kernel.
+
+2005-09-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Install UDEV rule file, so /dev/fuse is created with mode 0666.
+ Help from Jens M. Noedler.
+
+2005-09-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add memory cleanup on thread exit
+
+2005-09-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Set umask to zero in fusexmp and fusexmp_fh, so that
+ files/directories are created with the requested mode.
+
+2005-09-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't ignore read error in multithreaded loop
+
+2005-09-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.4.0-pre2
+
+2005-09-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Revert lock and access operations. Postpone these until 2.5.
+
+2005-09-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compile warning on 2.6.13 and later
+
+ * Fix compilation on old kernels
+
+2005-08-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: always refresh directory contents after rewinddir() to
+ conform to SUS. Bug found by John Muir.
+
+2005-08-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.4.0-pre1
+
+2005-08-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: cleaned up (or messed up, depending on your POV) the low
+ level library API. Hopefully this is close to the final form.
+
+2005-08-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: don't allow empty mountpoint argument, which defeats
+ automatic umounting in fuse_main(). Bugreport by Václav Jůza
+
+2005-08-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fix warnings in fuse.h and fuse_lowlevel.h if -Wshadow compiler
+ option is used (Paul Alfille).
+
+2005-08-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * highlevel-lib: added mount options "attr_timeout" and
+ "entry_timeout". These options control the length of time file
+ attributes and entries (names) are cached. Both default to 1.0
+ second.
+
+ * kernel: correctly handle zero timeout for attributes and entries
+
+2005-08-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added missing symbols to versionscript (Joshua J. Berry)
+
+ * kernel: implement two flags, open can set: 'direct_io' and
+ 'keep_cache'. These correspond exactly to mount options
+ 'direct_io' and 'kernel_cache', but allow a per-open setting.
+
+ * Move 'direct_io' and 'kernel_cache' mount option handling to
+ userspace. For both mount options, if the option is given, then
+ the respective open flag is set, otherwise the open flag is left
+ unmodified (so the filesystem can set it).
+
+ * lib (highlevel): make open method optional
+
+2005-07-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: invalidate attributes for read/readdir/readlink
+ operations
+
+ * kernel: detect newer UML kernels
+
+2005-07-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make the installation path of fuse.ko and mount.fuse
+ configurable through INSTALL_MOD_PATH and MOUNT_FUSE_PATH
+ environment variables. Requirement and help from Csaba Henk.
+
+2005-07-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug, that causes filesystem requests to hang when unique
+ request counter becomes negative. This happens after
+ 2,147,483,648 operations, so most people won't care. Thanks to
+ Franco Broi for the report and testing.
+
+2005-07-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't change mtime/ctime/atime to local time on read/write.
+ Bug reported by Ben Grimm
+
+ * Install fuse_common.h and fuse_lowlevel.h. Report by Christian
+ Magnusson
+
+ * fusermount: use getopt_long() for option parsing. It allows the
+ use of '--' to stop argument scanning, so fusermount can now
+ operate on directories whose names begin with a '-'. Patch by
+ Adam Connell
+
+2005-07-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: add '-v', '--version' and '--help' options
+
+ * add inode based API
+
+2005-07-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: don't block signals in worker threads. Problem noticed by
+ Usarin Heininga
+
+2005-07-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: don't allow both 'allow_other' and 'allow_root' options to
+ be given
+
+2005-07-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: check if mountpoint is empty (only '.' and '..' for
+ directories, and size = 0 for regular files). If "nonempty"
+ option is given, omit this check. This is useful, so users don't
+ accidentally hide data (e.g. from backup programs). Thanks to
+ Frank van Maarseveen for pointing this out.
+
+ * kernel: check if mandatory mount options ('fd', 'rootmode',
+ 'user_id', 'group_id') are all given
+
+ * lib: simplify 'readdir_ino' handling
+
+ * lib: add mount options 'umask=M', 'uid=N', 'gid=N'
+
+2005-07-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: clean up 'direct_io' code
+
+2005-06-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add 'mount.fuse' written by Petr Klima
+
+ * '/dev/fuse' is created by 'make install' if does not yet exist
+
+2005-06-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix UCLIBC compile error. Patch by Christian Magnusson
+
+2005-06-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Enable the auto-loading of the module via access to the
+ corresponding device file. Patch by Takashi Iwai.
+
+ * Allow mounting a regular file (over a regular file) for
+ unprivleged users.
+
+ * Do not create temporary device file. Require "/dev/fuse" to
+ exist, and be readable/writable by the mounting user.
+
+2005-06-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3.0
+
+2005-06-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix serious information leak: if the filesystem returns a short
+ byte count to a read request, and there are non-zero number of
+ pages which are not filled at all, these pages will not be zeroed.
+ Hence the user can read out previous memory contents. Found by
+ Sven Tantau.
+
+2005-05-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add "readdir_ino" mount option, which tries to fill in the d_ino
+ field in struct dirent. This mount option is ignored if "use_ino"
+ is used. It helps some programs (e.g. 'pwd' used over NFS from a
+ non-Linux OS). Patch by David Shaw.
+
+2005-05-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-rc1
+
+2005-05-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * File save in krusader and other editors doesn't work with sshfs,
+ because open() is interrupted by a periodic signal, and open()
+ restarts forever, without any progress. This could just be fixed
+ in open(), but the problem is more generic: if signals are
+ received more often than the filesystem can get the request to
+ userspace, it will never finish. This is probably only a
+ theoretical problem, nevertheless I'm removing the possibility to
+ interrupt requests with anything other than SIGKILL, even before
+ being sent to userspace. Bugreport by Eduard Czimbalmos.
+
+2005-05-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: add "tree_lock" rwlock, that is locked for write in
+ rename, unlink and rmdir, and locked for read in all other
+ operations. This should fix the rename/release race reported by
+ Valient Gough and others. The solution is very coarse, a finer
+ grained locking scheme could be implemented, but it would be much
+ more complex. Let's see whether this is good enough.
+
+2005-05-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre7
+
+2005-05-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Better fix for out of order FORGET messages. Now the
+ LOOKUP/FORGET messages are balanced exactly (one FORGET can
+ balance many lookups), so the order no longer matters. This
+ changes the kernel ABI slightly, but the library remains backward
+ compatible.
+
+2005-05-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix abort for out of order FORGET messages. Again. Spotted by
+ Franco Broi again. Sorry :)
+
+2005-04-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre6
+
+2005-04-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make fusermount work with fuse kernel modules not yet supporting
+ the "group_id" option (added for the purpose of stricter
+ permission checking).
+
+2005-04-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check for hard-linked directories in lookup. This could cause
+ problems in the VFS, which assumes that such objects never exist.
+
+ * Make checking of permission for other users more strict. Now
+ the same privilege is required for the mount owner as for ptrace
+ on the process performing the filesystem operation.
+
+2005-04-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre5
+
+2005-04-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -msoft-float to kernel module compile flags for 2.4.X. This
+ is needed on certain architectures. Report from Chris Kirby
+
+ * Fix buggy behavior of open(..., O_CREAT|O_EXCL) if interrupted.
+ Reported by David Shaw
+
+ * Remove "allow_root" option from kernel module, and implement
+ it's functionality in the library
+
+ * Fix Oops caused by premature release of fuse_conn. Clean up
+ related code, to be more readable
+
+ * Sendfile should not use page cache if "direct_io" mount option
+ is given
+
+2005-04-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix Oops in case of nfs export. Spotted by David Shaw
+
+ * Fix another Oops in case of write over nfs with direct_io turned
+ on. Again spotted by David Shaw
+
+2005-04-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre4
+
+2005-04-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * lib: finalized new readdir() interface, which now supersedes the
+ getdir() method.
+
+2005-04-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre3
+
+2005-04-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Implement backward compatibility with version 5 kernel ABI
+
+2005-04-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre2
+
+2005-04-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix dirent offset handling
+
+ * lib: add readdir and releasedir methods
+
+ * lib: use fh field of fuse_file_info in opendir, readdir,
+ releasedir and fsyncdir methods
+
+ * lib: check kernel API version and bail out of it's old. This
+ will be properly fixed in the next release
+
+2005-03-31 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.3-pre1
+
+2005-03-31 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel API: add padding to structures, so 64bit and 32bit
+ compiler will return the same size
+
+ * kernel API: add offset field to fuse_dirent. This will allow
+ more sophisticated readdir interface for userspace
+
+ * kernel API: change major number to 6
+
+ * kernel: fix warnings on 64bit archs
+
+ * kernel: in case of API version mismatch, return ECONNREFUSED
+
+2005-03-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: trivial cleanups
+
+2005-03-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fsyncdir() operation
+
+2005-03-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: add locking to background list (fixes previous fix)
+
+2005-03-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix bug which could cause leave busy inodes after
+ unmount, and Oops.
+
+2005-03-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * examples: add -lpthread to link flags to work around valgrind
+ quirk
+
+ * lib: don't exit threads, so cancelation doesn't cause segfault
+
+2005-03-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: fix nasty bug which could cause an Oops under certain
+ situations. Found by Magnus Johansson
+
+2005-02-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: added opendir() method. This can be used in case
+ permission checking in getdir() is too late. Thanks to Usarin
+ Heininga for pointing out this deficiency
+
+ * libfuse: added init() and destroy() methods to fuse_operations
+
+ * kernel: llseek() method for files and directories made explicit
+
+ * kernel: fixed inode leak in NFS export in case of nodeid
+ wrapping
+
+2005-02-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: clean up some unitialized memory found with valgrind
+
+ * Add -lpthread to Libs in fuse.pc. Valgrind seems to need an
+ explicitly linked libpthread for applications
+
+2005-02-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: set umask, otherwise /etc/mtab will have
+ unpredictable permission. Spotted by Jindrich Kolorenc
+
+ * fusermount: set owner and group of /etc/mtab to original values
+ on unmount
+
+ * libfuse: add 'use_ino' option to help. Patch by Valient Gough
+
+2005-02-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Cleaned up directory reading (temporary file is not used)
+
+2005-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2
+
+2005-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix possible race when operation is interrupted
+
+2005-01-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compilation on 2.6.7
+
+2005-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre6
+
+2005-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in link() operation which caused the wrong path to be
+ passed as the first argument. Found by Anton Altaparmakov
+
+2005-01-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * LIB: fix double reply in readdir operation
+
+ * fusermount: fix uid checking bug. Patch by Adam Connell
+
+ * KERNEL: fix compile on various RedHat patched 2.4 kernels.
+ Patch by Keshava Gowda
+
+2005-01-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL: provide correct llseek semantics for fuse device (fixes
+ a bug on Progeny 2.4.20 kernel). Reported by Valient Gough
+
+2005-01-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre5 (matches kernel 2.6.11-rc1-mm2)
+
+2005-01-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL ABI: remove GETDIR operation, and add OPENDIR, READDIR
+ and RELEASEDIR. This ends the ugly hack of passing a file
+ descriptor to the kernel, and actually makes the code simpler.
+
+2005-01-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre4
+
+2005-01-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: remove capability setting, which was the cause of
+ problems for some users. It seems that FS related capabilities
+ are removed by setfsuid(), so this isn't even needed.
+
+2005-01-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fix compilation on 2.4 kernels (reported by Valient Gough)
+
+ * fix failure to unmount bug (found by David Shaw)
+
+ * fusermount: improve parsing of /etc/fuse.conf
+
+2005-01-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove 'mount_max' and 'user_allow_other' module options. These
+ are now checked by fusermount, and can be set in /etc/fuse.conf
+
+ * KERNEL: change check for fsid == 0 to capable(CAP_DAC_OVERRIDE)
+
+2005-01-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL: fix possible inode allocation problem, where
+ sizeof(struct inode) is not aligned (found by Mike Waychison)
+
+ * KERNEL: use new follow_link/put_link methods
+
+ * KERNEL: cosmetic fixes
+
+2005-01-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre3
+
+2005-01-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add missing code that was accidently left out
+
+2005-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre2
+
+2005-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change "uid" mount option to "user_id" to avoid confusion with a
+ mount option "uid" commonly used by many filesystems
+
+2005-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.2-pre1
+
+2005-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * If FUSE is configured in the kernel, don't build it by default
+
+2005-01-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Compile fix by Christian Magnusson
+
+2005-01-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compilation for 2.6.{0-5} kernels
+
+2005-01-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL: if request is interrupted, still keep reference to used
+ inode(s) and file, so that FORGET and RELEASE are not sent until
+ userspace finishes the request.
+
+ * remove /{sys,proc}/fs/fuse/version, and instead add an INIT
+ request with the same information, which is more flexible,
+ simpler, works on embedded systems.
+
+2004-12-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL ABI: update interface to make it independent of type
+ sizes. This will help on 64 bit architectures which can run
+ legacy 32 bit applications.
+
+ * KERNEL ABI: add "len" field to request headers. This will allow
+ sending/receiving requests in multiple chunks.
+
+ * KERNEL: handle file type change more intelligently
+
+ * LIB: "-o debug" option should disable backgrounding (fix by
+ Fabien Reygrobellet)
+
+2004-12-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL: invalidate dentry/attributes if interrupted request
+ could leave filesystem in an unknown state.
+
+2004-12-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * KERNEL: lots of cleanups related to avoiding possible deadlocks.
+ These will cause some regressions, but stability is considered
+ more important. If any of these features turns out to be
+ important, it can be readded with the deadlock problems addressed.
+
+ * Make all requests interruptible (only with SIGKILL currently).
+ This can be used to break any deadlock produced by the userspace
+ filesystem accessing it's own exported files. The RELEASE request
+ is special, because if it's interrupted before sending it to
+ userspace it is still sent, but the reply is not awaited.
+
+ * If request is interrupted before being sent to userspace, and if
+ it hasn't yet got any side effects, it is always restarted,
+ regardless of the SA_RESTART flag. This makes these interruptions
+ transparent to the process.
+
+ * Remove shared-writable mmap support, which was prone to an
+ out-of-memory deadlock situation
+
+ * Remove INVALIDATE userspace initiated request
+
+ * Make readpages() synchronous. Asynchronous requests are
+ deadlock prone, since they cannot be interrupted.
+
+ * Add readv/writev support to fuse device operations
+
+ * Remove some printks, which userspace FS can use for a DoS
+ against syslog
+
+ * Remove 'large_read' mount option from 2.6 in kernel, check it in
+ fusermount instead
+
+ * LIB: improve compatibility with a fuse.h header installed in
+ ${prefix}/include which in turn includes the real header.
+
+ * LIB: improve compatibility by defining fuse_main() (which is now
+ not used), so old configure scripts find it.
+
+2004-12-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * When mounting on a subdirectory of / don't duplicate slashes at
+ the beggining of path (spotted by David Shaw)
+
+2004-12-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug causing garbage in mount options (spotted by David Shaw)
+
+2004-12-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add 'writepage' flag to 'fuse_file_info'.
+
+ * More comments in fuse.h
+
+ * Get rid of double underscores
+
+2004-12-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -D_FILE_OFFSET_BITS=64 to cflags provided by pkg-config
+
+ * helper.c: add -ho option, which only displays the options not
+ the usage header. This can be used by filesystems which have
+ their own options.
+
+2004-12-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add source compatibility to 2.1 and 1.1 APIs. To select betwen
+ versions simply define FUSE_USE_VERSION to 22, 21 or 11 before
+ including the fuse header
+
+ * Add binary compatibility to 2.1 version of library with symbol
+ versioning
+
+2004-12-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.1
+
+2004-12-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: clean up writing functions
+
+ * kernel: no allocation on write in direct_io mode
+
+ * move linux/fuse.h to fuse_kernel.h
+
+2004-11-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: clean up reading functions
+
+2004-11-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel: make readpage() uninterruptible
+
+ * kernel: check readonly filesystem flag in fuse_permission
+
+ * lib: don't die if version file not found and new style device
+ exists
+
+ * lib: add '-r' option, which is short for '-o ro'
+
+ * fusermount: simplify device opening
+
+ * kernel: when direct_io is turend on, copy data directly to
+ destination without itermediate buffer. More efficient and safer,
+ since no allocation is done.
+
+ * fusermount: fix warning if fuse module is not loaded
+
+ * kernel: use /dev/fuse on 2.4 too
+
+2004-11-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse API change: open, read, write, flush, fsync and release
+ are passed a 'struct fuse_file_info' pointer containing the open
+ flags (open and release), and the file handle. Verion changed to
+ 3.0.
+
+2004-11-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * More cleanups in the kernel
+
+ * The 10,229 charater device number has been assigned for FUSE
+
+ * Version file checking fix (reported by Christian Magnusson)
+
+ * fusermount: opening the fuse device now doesn't need /sys.
+
+ * Optimize reading by controlling the maximum readahead based on
+ the 'max_read' mount option
+
+ * fixes for UCLIBC (Christian Magnusson)
+
+2004-11-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Cleaned up kernel in preparation for merge into mainline:
+
+ * Use /sys/fs/fuse/version instead of /proc/fs/fuse/version
+
+ * Use real device (/dev/fuse) instead of /proc/fs/fuse/dev
+
+ * __user annotations for sparse
+
+ * allocate individual pages instead of kmalloc in fuse_readdir,
+ fuse_read and fuse_write.
+
+ * Fix NFS export in case "use_ino" mount option is given
+
+ * Make libfuse and fusermount compatible with future versions
+
+ * fusermount: properly add mount options to /etc/mtab
+
+2004-11-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fusermount: do not resolve last component of mountpoint on if it
+ is '.' or '..'. This new path resolvation is now done on mount as
+ well as unmount. This enables relative paths to work on unmount.
+
+ * fusermount: parse common mount options like "ro", "rw", etc...
+
+ * Allow module params to be changed through sysfs
+
+2004-11-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.1-pre1
+
+2004-11-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in fuse_readpages() causing Oops in certain situations.
+ Bug found by Vincenzo Ciancia.
+
+ * Fix compilation with kernels versions > 2.6.9.
+
+2004-11-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check kernel interface version in fusermount to prevent
+ strangeness in case of mismatch.
+
+ * No need to allocate fuse_conn until actual mount happens
+
+ * Fix potential race between umount and fuse_invalidate
+
+ * Check superblock of proc file in addition to inode number
+
+ * Fix race between request_send_noreply() and fuse_dev_release()
+
+2004-11-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Separate configure for the kernel directory
+
+ * Don't allow write to return more than 'count'
+
+ * Extend kernel interface for future use
+
+2004-11-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix 'makeconf.sh' to use autoreconf if available
+
+2004-11-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add ino argument to 'fuse_dirfil_t'. NOTE: This breaks source
+ compatibility with earlier versions. To compile earier versions
+ just add '-DFUSE_DIRFIL_COMPAT' compile flag or fix the source.
+ Do not use the "use_ino" mount flag with filesystems compiled with
+ FUSE_DIRFIL_COMPAT.
+
+ * Add pkg-config support. To compile a FUSE based filesystem you
+ can do "gcc -Wall `pkg-config --cflags --libs fuse` myfs.c -o myfs"
+ or similar. Note, that the PKG_CONFIG_PATH environment variable
+ usually needs to be set to "/usr/local/lib/pkgconfig".
+
+ * fuse.h is now installed in ${prefix}/include/fuse/
+
+2004-11-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added "use_ino" mount option. This enables the filesystems to
+ set the st_ino field on files
+
+2004-11-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix compile problems with ancient (<=2.4.18) kernels (reported
+ by Jeremy Smith)
+
+ * Add "allow_root" mount option. Patch by Yaroslav Rastrigin
+
+ * Clear the 'exited' flag when mail loop is finished
+
+2004-10-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make xattr functions work under 2.6 (bug found by Vincenzo
+ Ciancia)
+
+2004-10-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Reset request in fuse_flush() (bugreport by David Shaw)
+
+2004-10-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fuse_main() now does not exit on error, rather it returns an
+ error code
+
+ * Exported __fuse_setup() and __fuse_teardown() functions, which
+ make it easier to implement a custom event loop.
+
+ * Use daemon() call to background the filesystem after mounting.
+ This function closes the standard input, output and error and
+ changes the current working directory to "/".
+
+2004-10-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 1.9
+
+2004-10-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Don't allow fuse_flush() to be interrupted (bug found by David
+ Shaw)
+
+2004-09-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add PID to fuse_context. Patch by Steven James
+
+ * Change file handle type to 'unsigned long' in kernel interface
+
+2004-09-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * A slight API change: fuse_get_context() doesn't need the "fuse"
+ pointer, but the returned context contains it instead. The
+ fuse_get() function is not needed anymore, so it's removed.
+
+ * Fix mounting and umounting FUSE filesystem under another FUSE
+ filesystem by non-root (bug spotted by Valient Gough)
+
+2004-09-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix deadlock in case of memory allocation failure. Patch by
+ Christian Magnusson
+
+2004-09-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check memory allocation failures in libfuse
+
+2004-09-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check temporary file creation failure in do_getdir(). Bug
+ spotted by Terje Oseberg
+
+2004-09-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Allow "large_read" option for 2.6 kernels but warn of deprecation
+
+ * Make requests non-interruptible so race with FORGET is avoided.
+ This is only a temporary solution
+
+ * Support compiling FUSE kernel module on 2.4.x UML kernels
+
+2004-09-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in case two FORGETs for the same node are executed in
+ the wrong order. Bug spotted and endured for months by Franco
+ Broi, and logfile for solution provided by Terje Oseberg
+
+2004-09-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add -D_REENTRANT to the compile flags
+
+ * Add documentation of fuse internals by Terje Oseberg
+
+2004-08-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change release method to be non-interruptible. Fixes bug
+ causing missing release() call when program which has opened files
+ is killed (reported by Franco Broi and David Shaw)
+
+2004-07-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add fuse_invalidate() to library API
+
+2004-07-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check permissions in setattr if 'default_permissions' flag is
+ set. Bug spotted by Damjan Lango
+
+2004-07-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * 'large_read' mount option removed for 2.6 kernels, since the
+ default (dynamic read size) is better
+
+ * Extend kernel API with file handles. A file handle is returned
+ by open, and passed to read, write, flush, fsync and release.
+ This is currently only used for debug output in the library.
+
+ * Security changes:
+
+ * Change the current directory to the mountpoint before checking
+ the permissions and mount filesystem on "."
+
+ * By default don't modprobe the fuse module for non-root. The old
+ behavior can be restored with the '--enable-auto-modprobe' flag of
+ ./configure
+
+ * By default don't allow shared writable mappings for non-root.
+ The old behavior can be restored with the 'user_mmap=1' module
+ parameter
+
+2004-07-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clean up mount option passing to fusermount and to fuse_new()
+ BEWARE: this changes the userspace API slightly, and the command
+ line usage of programs using fuse_main()
+
+2004-07-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Optimize reading under 2.6 kernels by issuing multiple page
+ asynchronous read requests
+
+2004-07-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Only use redirty_page_for_writepage() for kernels >= 2.6.6
+
+2004-07-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Separate directory entry and inode attribute validity timer
+
+ * New write semaphore to stop page writeback during truncate
+
+ * Fsync now waits for all writes to complete before sending the
+ request
+
+ * Optimization: if a page is completely written by
+ fuse_commit_write(), clear the dirty flag and set the uptodate
+ flag for that page
+
+ * Some memory cleanup at exit
+
+2004-07-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add FUSE_HARD_REMOVE flag, and '-i' option to fuse main, which
+ disable the "hide if open" behavior of unlink/rename.
+
+ * If temporary buffer allocation fails in raw read, fall back to a
+ smaller buffer
+
+2004-07-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug in do_open() in libfuse: open count was incremented
+ after the reply is sent so it could race with unlink/forget and
+ cause an abort.
+
+2004-07-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * When performing create or remove operation, refresh the parent's
+ attributes on next revalidate, as i_nlink (and maybe size/time)
+ could be inacurate.
+
+ * Use redirty_page_for_writepage() in fuse_writepage() for skipped
+ pages (2.6 only)
+
+ * Set set_page_dirty address space operation (2.6 only)
+
+2004-07-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Minor fix in read: print debug info even if read size is zero
+
+2004-07-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix race between truncate and writepage (fsx-linux now runs
+ without error)
+
+2004-07-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix kernel hang on mkfifo under 2.4 kernels (spotted and patch
+ by Mattias Wadman)
+
+ * Added option for direct read/write (-r)
+
+ * Fix revalidate time setting for newly created inodes
+
+ * Remove uid==0 check for '-x' option in fusermount (kernel checks
+ this)
+
+ * fuse_main() only installs handlers for signals (out of INT, HUP,
+ TERM, PIPE), for which no handler has yet been installed
+
+ * Add module option 'user_allow_other' which if set to non-zero
+ will allow non root user to specify the 'allow_other' mount option
+ ('-x' option of fusermount)
+
+ * Fix deadlock between page writeback completion and truncate
+ (bug found by Valient Gough with the fsx-linux utility)
+
+2004-07-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Change passing fuse include dir to 2.6 kernel make system more
+ robust (fixes compile problems seen on SuSE 9.1 with updated 2.6
+ kernel)
+
+2004-06-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Acquire inode->i_sem before open and release methods to prevent
+ concurrent rename or unlink operations.
+
+ * Make __fuse_read_cmd() read only one command. This allows
+ multiplexing the fuse file descriptor with other event sources
+ using select() or poll() (patch by Jeff Harris)
+
+ * Export 'exited' flag with __fuse_exited() (patch by Jeff Harris)
+
+2004-06-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix file offset wrap around at 4G when doing large reads
+
+2004-06-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix memory leak in open (Valient Gough)
+
+2004-06-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add "close after delete" support to libfuse (patch by Valient
+ Gough)
+
+ * Cancel all worker threads before exit in multithreaded mode
+
+2004-06-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix locking bugs
+
+ * Don't send reply to RELEASE
+
+ * Work with newer libtool (1.5a)
+
+ * Check for st_atim member of struct stat
+
+2004-06-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * No request allocation needed on inode and file release
+
+2004-06-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix possible inode leak in userspace in case of unfinished
+ lookup/mknod/mkdir/symlink/link operation.
+
+2004-06-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix some races and cleanups in fuse_read_super()
+
+2004-06-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Requests are allocated at open time
+
+2004-06-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Build shared library as well as static (using libtool)
+
+ * Change FUSE_MINOR_VERSION from 1 to 0. I know it's illegal but
+ there has not been a release with the previous minor number, and I
+ hope nobody is using it for anything.
+
+ * Change fuse_main(), so that default behavior is to go into
+ background if mount is successful. '-f' and '-d' options disable
+ backgrounding. This fixes the "Why does my FUSE daemon hang?"
+ newbie complaint.
+
+ * Cache ENOSYS (function not implemented) errors on *xattr, flush
+ and fsync
+
+ * Don't call getdir method from open() only from first readdir().
+ Open is sometimes just used to store the current directory
+ (e.g. find)
+
+2004-05-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added flush() call
+
+2004-05-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Extended attributes support for 2.4 (patch by Cody Pisto)
+
+2004-04-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fixed parser with modversions (Mattias Wadman)
+
+2004-04-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added mount option parser to 2.4 build
+
+2004-04-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Replaced binary mount data with text options
+
+ * Show FUSE specific mount options in /proc/mounts
+
+ * Check in fuse.h whether _FILE_OFFSET_BITS is set to 64
+
+2004-04-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Check some limits so userspace won't get too big requests
+
+2004-04-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Kill compile warning
+
+ * Upgraded user-mount patch for 2.6.5
+
+2004-04-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add detection of user-mode-linux to configure
+
+2004-03-31 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fixed zero size case for getxattr and listxattr
+
+2004-03-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * new fusermount flag '-z': lazy unmount, default is not lazy
+
+ * Extended attributes operations added (getxattr, setxattr,
+ listxattr, removexattr)
+
+2004-03-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * If filesystem doesn't define a statfs operation, then an
+ all-zero default statfs is returned instead of ENOSYS
+
+2004-03-24 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add FS_BINARY_MOUNTDATA filesystem flag for kernels > 2.6.4
+
+2004-03-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix for uClinux (Christian Magnusson)
+
+2004-03-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fuse_main() adds "-n progname" to the fusermount command line
+
+ * More kernel interface changes:
+
+ * Lookup/getattr return cache timeout values
+
+2004-02-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Clean up option parsing in fuse_main()
+
+ * Added fuse_get() function which returns the fuse object created
+ by fuse_main()
+
+2004-02-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * removed old way of mounting (fusermount mountpoint program)
+
+ * more kernel interface changes:
+
+ * added nanosecond precision to file times
+
+ * removed interface version from mount data
+
+ * added /proc/fs/fuse/version which contains MAJOR.MINOR
+
+2004-02-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * statfs library API changed to match other methods. Since this
+ is not backward compatible FUSE_MAJOR_VERSION is changed to 2
+
+ * kernel interface changes follow:
+
+ * statfs changed to 64 bits, added 'bavail' field
+
+ * add generation number to lookup result
+
+ * optimized mknod/mkdir/symlink/link (no separate lookup is
+ needed)
+
+ * rdev size increased to 32 bits for mknod
+
+ * kernel interface version changed to 3.1
+
+2004-02-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * user-mount upgraded for 2.6.3 kernel
+
+2004-02-17 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added user-mount.2.6.2-rc3.patch
+
+ * Add FS_SAFE flag to fuse filesystem
+
+ * fusermount should allow (un)mounting for non-root even if not
+ suid-root
+
+2004-02-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Remove MS_PERMISSION mount flag (that means something else now)
+
+2004-02-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added check for i_size_read/write functions to configure.in
+ (patch by Valient Gough)
+
+2004-02-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fixed writing >= 2G files
+
+ * Check file size on open (with generic_file_open())
+
+ * Readpage calls flush_dcache_page() after storing data
+
+ * Use i_size_read/write for accessing inode->i_size
+
+ * Make loopback mount of a fuse file work
+
+2004-02-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 1.1
+
+2004-01-29 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Properly check if the inode exists in fuse_invalidate
+
+2004-01-27 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added -q option for fusermount
+
+ * fuse_unmount() now uses -q option of fusermount, so no error is
+ printed if the cause of the program exit is that the filesystem
+ has already been unmounted
+
+ * Fix i_nlink correctness after rmdir/unlink
+
+2004-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 1.1-pre2
+
+2004-01-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix typo (thanks Marcos Dione)
+
+ * Compile fixes for 2.4 kernels
+
+2004-01-23 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix CONFIG_MODVERSIONS compile on 2.6
+
+2004-01-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Write all pending data before a RELEASE operation
+
+ * Suppress 'Bad file descriptor' warning on exit
+
+ * Replaced fusermount option '-d xxx' with '-n xxx' so it doesn't
+ get confused with '-d' of fuse_main() (sorry about this change)
+
+ * New fusermount option '-l' which enables big reads. Big reads
+ are now disabled by default.
+
+ * fuse_main() can accept fusermount arguments after a '--'
+
+2004-01-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Support for exporting filesystem over NFS (see README.NFS)
+
+2004-01-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Support non-blocking writepage on 2.6. This makes FUSE behave
+ much more nicely in low-memory situations
+
+ * Fix 32-bit dev handling in getattr and mknod for 2.6 kernels.
+ (Note: the mknod method does not yet use 32bit device number)
+
+2004-01-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Code cleanups
+
+2004-01-07 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 1.1-pre1
+
+2004-01-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Integrated 2.6 kernel support patch by Michael Grigoriev
+
+ * Improvements and cleanups for 2.6 kernels
+
+2004-01-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added -d option to fusermount
+
+2003-12-15 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added major+minor version to library API, and minor version to
+ kernel API
+
+2003-12-13 David McNab <david@rebirthing.co.nz>
+
+ * Implemented fsync support in examples/example.py
+
+ * Implemented 'fsync' and 'statfs' methods in python
+ interface
+
+2003-12-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Make it compile on 2.4.19.
+
+ * Add fsync operation (write file failed on xemacs & vi)
+
+2003-12-12 David McNab <david@rebirthing.co.nz>
+
+ * Added distutils support to the python module, as per standard
+ python development practice
+
+2003-12-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Add file locking for mount/unmount (based on patch by Valient
+ Gough)
+
+2003-12-11 David McNab <david@rebirthing.co.nz>
+
+ * Python filesystem - was broken with python2.3, now fixed:
+ - changed PyTuple_* calls to PySequence_*, because os.lstat
+ is no longer returning a pure tuple
+ - changed PyInt_Check() calls to also call PyLong_Check,
+ to cover for cases (eg os.lstat) where longs are returned
+ - Added support for file 'release' handling, which IMO is
+ essential since this signals to a FS that writes to a file
+ are complete (and therefore the file can now be disposed of
+ meaningfully at the python filesystem's discretion)
+ - Added '__init__' handler to base Fuse class, which allows
+ your Python class to know the mountpoint and mount args,
+ as attributes myfs.mountpoint, myfs.optlist, myfs.optdict
+
+ * General:
+ - added 'mount.fuse' script (in util/ dir), which is meant to be
+ symlinked from /sbin, and which allows FUSE filesystems to
+ be mounted with the 'mount' command, and listed in fstab;
+ also, mount arguments get passed to your filesystem
+
+
+2003-11-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix kernel version detection (again). Bugreport by Peter Levart
+
+2003-11-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Applied read combining patch by Michael Grigoriev (tested by
+ Valient Gough and Vincent Wagelaar)
+
+2003-10-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Mtab handling fix in fusermount by "Valient Gough" (SF patch
+ #766443)
+
+2003-10-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Error code fixes in kernel module
+
+2003-10-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * kernel version detection fix
+
+ * fusermount now uses "lazy" umount option
+
+ * fusermount can use modprobe with module-init-tools
+
+2003-09-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Integrated caching patch by Michael Grigoriev
+
+ * Added "Filesystems" file with descriptions of projects using
+ FUSE
+
+ * Added patch by Michael Grigoriev to allow compliation of FUSE
+ kernel module for 2.6 kernels
+
+2003-06-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * And another spec-file fix by Achim Settelmeier
+
+2003-05-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Spec-file fix by Achim Settelmeier
+
+2003-03-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix umount oops (found by Samuli Kärkkäinen)
+
+2003-03-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Merge of fuse_redhat.spec and fuse.spec by Achim Settelmeier
+
+2003-03-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Updated fuse.spec file (Achim Settelmeier)
+
+2003-02-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Version 1.0 released
+
+2003-02-12 Miklos Szeredi <miklos@szeredi.hu>
+
+ * SuSE compilation fix by Juan-Mariano de Goyeneche
+
+2002-12-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * The release() VFS call is now exported to the FUSE interface
+
+2002-12-05 Miklos Szeredi <miklos@szeredi.hu>
+
+ * 64 bit file offset fixes in the fuse kernel module
+
+ * Added function 'fuse_exit()' which can be used to exit the main
+ loop
+
+2002-12-03 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added _FILE_OFFSET_BITS=64 define to fuse.h. Note, that this is
+ an incompatible interface change.
+
+2002-10-28 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Portablility fix (bug reported by C. Chris Erway)
+
+2002-10-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Use Mark Glines' fd passing method for default operation instead
+ of old reexec
+
+2002-10-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fix "Stale NFS file handle" bug caused by changes in 2.4.19
+
+2002-10-22 Miklos Szeredi <miklos@szeredi.hu>
+
+ * fix incompatiblity with Red Hat kernels, with help from Nathan
+ Thompson-Amato.
+
+2002-04-18 Mark Glines <mark@glines.org>
+
+ * added an alternative to fuse_mount(), called
+ fuse_mount_ioslave(), which does not need to reexec the
+ FUSE program.
+ * added a small helper util needed by fuse_mount_ioslave().
+
+2002-03-16 Mark Glines <mark@glines.org>
+
+ * use struct fuse_statfs everywhere possible to avoid problems
+ with the headerfiles changing struct statfs member sizes
+
+2002-03-01 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Another RPM spec file for RedHat >= 7 by Ian Pilcher
+
+2002-01-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * RPM support by Achim Settelmeier
+
+2002-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Version 0.95 released
+
+2002-01-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Revaidate all path components not just the last, this means a
+ very small performance penalty for being more up-to-date.
+
+2002-01-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Update and fix python interface
+
+2002-01-07 Mark Glines <mark@glines.org>
+
+ * Added statfs() support to kernel, lib, examples, and perl!
+
+2001-12-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Better cross compilation support
+
+ * Ported to Compaq IPAQ
+
+2001-12-20 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added function fuse_get_context() to library API (inspired by
+ patch from Matt Ryan)
+
+ * Added flags to fusermount and to kernel interface to control
+ permission checking
+
+ * Integrated fuse_set_operations() into fuse_new()
+
+2001-12-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Applied header protection + extern "C" patch by Roland
+ Bauerschmidt
+
+2001-12-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Added perl bindings by Mark Glines
+
+2001-11-21 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Cleaned up way of mounting simple filesystems.
+
+ * fuse_main() helper function added
+
+2001-11-18 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Optimized read/write operations, so that minimal copying of data
+ is done
+
+2001-11-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Python bindings by Jeff Epler added
+
+2001-11-13 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fixed vfsmount reference leak in fuse_follow_link
+
+ * FS blocksize is set to PAGE_CACHE_SIZE, blksize attribute from
+ userspace is ignored
+
+2001-11-09 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Started ChangeLog
diff --git a/fuse/README b/fuse/README
index 3d1f6f091..398dd6557 100644
--- a/fuse/README
+++ b/fuse/README
@@ -1,12 +1,380 @@
-Libfuse for Android
+General Information
+===================
-FUSE[1] is a framework to develop userspace file systems for linux. Since Android is based on linux, it won't be too difficult to port libfuse to Android.
+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.
-The main problem of building and running libfuse on Android is that the bionic c library lacks support for pthread_cancel(), which is necessary for libfuse multi-thread code. This stackoverflow entry[2] has suggested a solution, which uses SIGUSR1 as an alternative. It seems to work.
+You can download the source code releases from
-Libfuse can be build with Android NDK[3]. If success, you will get libfuse.a and an example program fusexmp. To run the example, the android kernel should be built with FUSE kernel support.
+ http://sourceforge.net/projects/fuse
-References:
-[1]. http://fuse.sourceforge.net
-[2]. http://stackoverflow.com/questions/4610086/pthread-cancel-alternatives-in-android-ndk
-[3]. http://developer.android.com/sdk/ndk/index.html
+or alternatively you can use CVS to get the very latest development
+version:
+
+ cvs -d :pserver:anonymous@fuse.cvs.sourceforge.net:/cvsroot/fuse co fuse
+
+
+Dependencies
+============
+
+Linux kernel version 2.6.X where X >= 9.
+
+Alternatively a kernel module from FUSE release 2.5.* can be used with
+this release, which supports kernels >= 2.4.21.
+
+Installation
+============
+
+./configure
+make
+make install
+modprobe fuse
+
+You may also need to add '/usr/local/lib' to '/etc/ld.so.conf' and/or
+run ldconfig.
+
+You'll also need a fuse kernel module, Linux kernels 2.6.14 or later
+contain FUSE support.
+
+For more details see the file 'INSTALL'
+
+How To Use
+==========
+
+FUSE is made up of three main parts:
+
+ - A kernel filesystem module
+
+ - A userspace library
+
+ - A mount/unmount program
+
+
+Here's how to create your very own virtual filesystem in five easy
+steps (after installing FUSE):
+
+ 1) Edit the file example/fusexmp.c to do whatever you want...
+
+ 2) Build the fusexmp program
+
+ 3) run 'example/fusexmp /mnt/fuse -d'
+
+ 4) ls -al /mnt/fuse
+
+ 5) Be glad
+
+If it doesn't work out, please ask! Also see the file 'include/fuse.h' for
+detailed documentation of the library interface.
+
+Security
+========
+
+If you run 'make install', the fusermount program is installed
+set-user-id to root. This is done to allow normal users 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:
+
+ - The user can only mount on a mountpoint, for which it has write
+ permission
+
+ - The mountpoint is not a sticky directory which isn't owned by the
+ user (like /tmp usually is)
+
+ - No other user (including root) can access the contents of the mounted
+ filesystem.
+
+Configuration
+=============
+
+Some options regarding mount policy can be set in the file
+'/etc/fuse.conf'
+
+Currently these options are:
+
+mount_max = NNN
+
+ Set the maximum number of FUSE mounts allowed to non-root users.
+ The default is 1000.
+
+user_allow_other
+
+ Allow non-root users to specify the 'allow_other' or 'allow_root'
+ mount options.
+
+
+Mount options
+=============
+
+Most of the generic mount options described in 'man mount' are
+supported (ro, rw, suid, nosuid, dev, nodev, exec, noexec, atime,
+noatime, sync async, dirsync). Filesystems are mounted with
+'-onodev,nosuid' by default, which can only be overridden by a
+privileged user.
+
+These are FUSE specific mount options that can be specified for all
+filesystems:
+
+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. This is option 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. 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.
+
+allow_root
+
+ This option is similar to 'allow_other' but file access is limited
+ to the user mounting the filesystem and root. This option and
+ 'allow_other' are mutually exclusive.
+
+kernel_cache
+
+ This option disables flushing the cache of the file contents on
+ every open(). 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 "intermediate" filesystems.
+
+ NOTE: if this option is not specified (and neither 'direct_io') data
+ is still cached after the open(), so a read() system call will not
+ always initiate a read operation.
+
+auto_cache
+
+ This option enables automatic flushing of the data cache on open().
+ The cache will only be flushed if the modification time or the size
+ of the file has changed.
+
+large_read
+
+ 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.
+
+direct_io
+
+ This option disables the use of page cache (file content cache) in
+ the kernel for this filesystem. This has several affects:
+
+ - Each read() or write() system call will initiate one or more
+ read or write operations, data will not be cached in the
+ kernel.
+
+ - 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).
+
+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).
+
+max_readahead=N
+
+ 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)
+
+max_write=N
+
+ 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.
+
+async_read
+
+ Perform reads asynchronously. This is the default
+
+sync_read
+
+ Perform all reads (even read-ahead) synchronously.
+
+hard_remove
+
+ The default behavior is that if an open file is deleted, the file is
+ renamed to a hidden file (.fuse_hiddenXXX), 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 ENOENT):
+ - read()
+ - write()
+ - fsync()
+ - close()
+ - f*xattr()
+ - ftruncate()
+ - fstat()
+ - fchmod()
+ - fchown()
+
+debug
+
+ Turns on debug information printing by the library.
+
+fsname=NAME
+
+ Sets the filesystem source (first field in /etc/mtab). The default
+ is the program name.
+
+subtype=TYPE
+
+ Sets the filesystem type (third field in /etc/mtab). The default is
+ the program name.
+
+ If the kernel suppports it, /etc/mtab and /proc/mounts will show the
+ filesystem type as "fuse.TYPE"
+
+ If the kernel doesn't support subtypes, the source filed will be
+ "TYPE#NAME", or if fsname option is not specified, just "TYPE".
+
+use_ino
+
+ Honor the 'st_ino' field in getattr() and fill_dir(). This value is
+ used to fill in the 'st_ino' field in the stat()/lstat()/fstat()
+ functions and the 'd_ino' field in the readdir() function. The
+ filesystem does not have to guarantee uniqueness, however some
+ applications rely on this value being unique for the whole
+ filesystem.
+
+readdir_ino
+
+ If 'use_ino' option is not given, still try to fill in the 'd_ino'
+ field in readdir(). 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 '-1'. If 'use_ino' option is given,
+ this option is ignored.
+
+nonempty
+
+ Allows mounts over a non-empty file or directory. By default these
+ mounts are rejected (from version 2.3.1) to prevent accidental
+ covering up of data, which could for example prevent automatic
+ backup.
+
+umask=M
+
+ Override the permission bits in 'st_mode' set by the filesystem.
+ The resulting permission bits are the ones missing from the given
+ umask value. The value is given in octal representation.
+
+uid=N
+
+ Override the 'st_uid' field set by the filesystem.
+
+gid=N
+
+ Override the 'st_gid' field set by the filesystem.
+
+blkdev
+
+ Mount a filesystem backed by a block device. This is a privileged
+ option. The device must be specified with the 'fsname=NAME' option.
+
+entry_timeout=T
+
+ 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. "-oentry_timeout=2.8")
+
+negative_timeout=T
+
+ The timeout in seconds for which a negative lookup will be cached.
+ This means, that if file did not exist (lookup retuned ENOENT), 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.
+
+attr_timeout=T
+
+ The timeout in seconds for which file/directory attributes are
+ cached. The default is 1.0 second.
+
+ac_attr_timeout=T
+
+ The timeout in seconds for which file attributes are cached for the
+ purpose of checking if "auto_cache" should flush the file data on
+ open. The default is the value of 'attr_timeout'
+
+intr
+
+ Allow requests to be interrupted. Turning on this option may result
+ in unexpected behavior, if the filesystem does not support request
+ interruption.
+
+intr_signal=NUM
+
+ Specify which signal number to send to the filesystem when a request
+ is interrupted. The default is 10 (USR1).
+
+modules=M1[:M2...]
+
+ 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.
+
+
+Modules distributed with fuse
+-----------------------------
+
+iconv
+`````
+Perform file name character set conversion. Options are:
+
+from_code=CHARSET
+
+ Character set to convert from (see iconv -l for a list of possible
+ values). Default is UTF-8.
+
+to_code=CHARSET
+
+ Character set to convert to. Default is determined by the current
+ locale.
+
+
+subdir
+``````
+Prepend a given directory to each path. Options are:
+
+subdir=DIR
+
+ Directory to prepend to all paths. This option is mandatory.
+
+rellinks
+
+ Transform absolute symlinks into relative
+
+norellinks
+
+ Do not transform absolute symlinks into relative. This is the default.
+
+
+Reporting bugs
+==============
+
+Please send bug reports to the <fuse-devel@lists.sourceforge.net>
+mailing list.
+
+The list is open, you need not be subscribed to post.
diff --git a/fuse/include/config.h b/fuse/android/config.h
index a0c603ab6..dac8c1671 100644
--- a/fuse/include/config.h
+++ b/fuse/android/config.h
@@ -72,16 +72,16 @@
#define PACKAGE_NAME "fuse"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "fuse 2.8.5"
+#define PACKAGE_STRING "fuse 2.9.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fuse"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.8.5"
+#define PACKAGE_VERSION "2.9.3"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "2.8.5"
+#define VERSION "2.9.3"
diff --git a/fuse/android/statvfs.c b/fuse/android/statvfs.c
new file mode 100644
index 000000000..7cec574da
--- /dev/null
+++ b/fuse/android/statvfs.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "sys/statvfs.h"
+#include <sys/statfs.h>
+
+#define MAP(to,from) vfs->to = sfs.from
+
+int statvfs(const char *path, struct statvfs *vfs) {
+ struct statfs sfs;
+ int ret;
+ int *fsid;
+ if ((ret = statfs(path, &sfs)) != 0)
+ return ret;
+
+ MAP(f_bsize, f_bsize);
+ MAP(f_frsize, f_frsize);
+ MAP(f_blocks, f_blocks);
+ MAP(f_bfree, f_bfree);
+ MAP(f_bavail, f_bavail);
+ MAP(f_files, f_files);
+ MAP(f_ffree, f_ffree);
+ MAP(f_namemax, f_namelen);
+
+ vfs->f_favail = 0;
+ vfs->f_flag = 0;
+
+ fsid = (int *)&sfs.f_fsid;
+ vfs->f_fsid = (fsid[0] << sizeof(fsid[0])) | fsid[1];
+
+ return ret;
+}
diff --git a/fuse/android/sys/statvfs.h b/fuse/android/sys/statvfs.h
new file mode 100644
index 000000000..0d770dd72
--- /dev/null
+++ b/fuse/android/sys/statvfs.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _SYS_STATVFS_H_
+#define _SYS_STATVFS_H_
+#include <sys/types.h>
+
+struct statvfs {
+ unsigned long f_bsize; /* file system block size */
+ unsigned long f_frsize; /* fragment size */
+ fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
+ fsblkcnt_t f_bfree; /* # free blocks */
+ fsblkcnt_t f_bavail; /* # free blocks for non-root */
+ fsfilcnt_t f_files; /* # inodes */
+ fsfilcnt_t f_ffree; /* # free inodes */
+ fsfilcnt_t f_favail; /* # free inodes for non-root */
+ unsigned long f_fsid; /* file system ID */
+ unsigned long f_flag; /* mount flags */
+ unsigned long f_namemax; /* maximum filename length */
+};
+
+int statvfs(const char *, struct statvfs *);
+#endif
diff --git a/fuse/buffer.c b/fuse/buffer.c
index 053e396bc..6fa55c979 100644
--- a/fuse/buffer.c
+++ b/fuse/buffer.c
@@ -45,7 +45,7 @@ static ssize_t fuse_buf_write(const struct fuse_buf *dst, size_t dst_off,
while (len) {
if (dst->flags & FUSE_BUF_FD_SEEK) {
- res = pwrite(dst->fd, src->mem + src_off, len,
+ res = pwrite64(dst->fd, src->mem + src_off, len,
dst->pos + dst_off);
} else {
res = write(dst->fd, src->mem + src_off, len);
@@ -160,10 +160,10 @@ static ssize_t fuse_buf_splice(const struct fuse_buf *dst, size_t dst_off,
size_t len, enum fuse_buf_copy_flags flags)
{
int splice_flags = 0;
- off64_t *srcpos = NULL;
- off64_t *dstpos = NULL;
- off64_t srcpos_val;
- off64_t dstpos_val;
+ loff_t *srcpos = NULL;
+ loff_t *dstpos = NULL;
+ loff_t srcpos_val;
+ loff_t dstpos_val;
ssize_t res;
size_t copied = 0;
diff --git a/fuse/cuse_lowlevel.c b/fuse/cuse_lowlevel.c
index be49ad473..ae08ed485 100644
--- a/fuse/cuse_lowlevel.c
+++ b/fuse/cuse_lowlevel.c
@@ -43,14 +43,14 @@ static void cuse_fll_open(fuse_req_t req, fuse_ino_t ino,
}
static void cuse_fll_read(fuse_req_t req, fuse_ino_t ino, size_t size,
- off64_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
(void)ino;
req_clop(req)->read(req, size, off, fi);
}
static void cuse_fll_write(fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off64_t off, struct fuse_file_info *fi)
+ size_t size, loff_t off, struct fuse_file_info *fi)
{
(void)ino;
req_clop(req)->write(req, buf, size, off, fi);
diff --git a/fuse/fuse.c b/fuse/fuse.c
index 588d44533..2c1aa17d8 100644
--- a/fuse/fuse.c
+++ b/fuse/fuse.c
@@ -30,13 +30,17 @@
#include <limits.h>
#include <errno.h>
#include <signal.h>
-#include <dlfcn.h>
#include <assert.h>
#include <poll.h>
#include <sys/param.h>
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/mman.h>
+#include <sys/file.h>
+
+#ifdef USE_MODULES
+#include <dlfcn.h>
+#endif
#define FUSE_NODE_SLAB 1
@@ -156,8 +160,8 @@ struct fuse {
struct lock {
int type;
- off64_t start;
- off64_t end;
+ loff_t start;
+ loff_t end;
pid_t pid;
uint64_t owner;
struct lock *next;
@@ -175,7 +179,7 @@ struct node {
int open_count;
struct timespec stat_updated;
struct timespec mtime;
- off64_t size;
+ loff_t size;
struct lock *locks;
unsigned int is_hidden : 1;
unsigned int cache_valid : 1;
@@ -221,6 +225,8 @@ struct fuse_context_i {
static pthread_key_t fuse_context_key;
static pthread_mutex_t fuse_context_lock = PTHREAD_MUTEX_INITIALIZER;
static int fuse_context_ref;
+
+#ifdef USE_MODULES
static struct fusemod_so *fuse_current_so;
static struct fuse_module *fuse_modules;
@@ -319,6 +325,7 @@ static void fuse_put_module(struct fuse_module *m)
}
pthread_mutex_unlock(&fuse_context_lock);
}
+#endif
static void init_list_head(struct list_head *list)
{
@@ -1021,10 +1028,12 @@ static void queue_element_unlock(struct fuse *f, struct lock_queue_element *qe)
if (qe->first_locked) {
wnode = qe->wnode1 ? *qe->wnode1 : NULL;
unlock_path(f, qe->nodeid1, wnode, NULL);
+ qe->first_locked = false;
}
if (qe->second_locked) {
wnode = qe->wnode2 ? *qe->wnode2 : NULL;
unlock_path(f, qe->nodeid2, wnode, NULL);
+ qe->second_locked = false;
}
}
@@ -1757,7 +1766,7 @@ static void fuse_free_buf(struct fuse_bufvec *buf)
}
int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec **bufp, size_t size, off64_t off,
+ struct fuse_bufvec **bufp, size_t size, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -1812,7 +1821,7 @@ int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
}
int fuse_fs_read(struct fuse_fs *fs, const char *path, char *mem, size_t size,
- off64_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
int res;
struct fuse_bufvec *buf = NULL;
@@ -1830,7 +1839,7 @@ int fuse_fs_read(struct fuse_fs *fs, const char *path, char *mem, size_t size,
}
int fuse_fs_write_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec *buf, off64_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -1894,7 +1903,7 @@ out:
}
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *mem,
- size_t size, off64_t off, struct fuse_file_info *fi)
+ size_t size, loff_t off, struct fuse_file_info *fi)
{
struct fuse_bufvec bufv = FUSE_BUFVEC_INIT(size);
@@ -1993,7 +2002,7 @@ static int fill_dir_old(struct fuse_dirhandle *dh, const char *name, int type,
}
int fuse_fs_readdir(struct fuse_fs *fs, const char *path, void *buf,
- fuse_fill_dir_t filler, off64_t off,
+ fuse_fill_dir_t filler, loff_t off,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -2104,7 +2113,7 @@ int fuse_fs_chown(struct fuse_fs *fs, const char *path, uid_t uid, gid_t gid)
}
}
-int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off64_t size)
+int fuse_fs_truncate(struct fuse_fs *fs, const char *path, loff_t size)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.truncate) {
@@ -2118,7 +2127,7 @@ int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off64_t size)
}
}
-int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, off64_t size,
+int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, loff_t size,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
@@ -2336,7 +2345,7 @@ int fuse_fs_poll(struct fuse_fs *fs, const char *path,
}
int fuse_fs_fallocate(struct fuse_fs *fs, const char *path, int mode,
- off64_t offset, off64_t length, struct fuse_file_info *fi)
+ loff_t offset, loff_t length, struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.fallocate) {
@@ -2393,6 +2402,7 @@ static char *hidden_name(struct fuse *f, fuse_ino_t dir, const char *oldname,
if (res)
break;
+ memset(&buf, 0, sizeof(buf));
res = fuse_fs_getattr(f->fs, newpath, &buf);
if (res == -ENOENT)
break;
@@ -2608,8 +2618,10 @@ void fuse_fs_destroy(struct fuse_fs *fs)
fuse_get_context()->private_data = fs->user_data;
if (fs->op.destroy)
fs->op.destroy(fs->user_data);
+#ifdef USE_MODULES
if (fs->m)
fuse_put_module(fs->m);
+#endif
free(fs);
}
@@ -2766,6 +2778,7 @@ static void fuse_lib_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
char *path;
int err;
+ memset(&buf, 0, sizeof(buf));
if (valid == FUSE_SET_ATTR_SIZE && fi != NULL &&
f->fs->op.ftruncate && f->fs->op.fgetattr)
err = get_path_nullok(f, ino, &path);
@@ -3235,7 +3248,7 @@ static void fuse_lib_open(fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_read(fuse_req_t req, fuse_ino_t ino, size_t size,
- off64_t off, struct fuse_file_info *fi)
+ loff_t off, struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_bufvec *buf = NULL;
@@ -3261,7 +3274,7 @@ static void fuse_lib_read(fuse_req_t req, fuse_ino_t ino, size_t size,
}
static void fuse_lib_write_buf(fuse_req_t req, fuse_ino_t ino,
- struct fuse_bufvec *buf, off64_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
@@ -3390,7 +3403,7 @@ static int extend_contents(struct fuse_dh *dh, unsigned minsize)
}
static int fill_dir(void *dh_, const char *name, const struct stat *statp,
- off64_t off)
+ loff_t off)
{
struct fuse_dh *dh = (struct fuse_dh *) dh_;
struct stat stbuf;
@@ -3440,7 +3453,7 @@ static int fill_dir(void *dh_, const char *name, const struct stat *statp,
}
static int readdir_fill(struct fuse *f, fuse_req_t req, fuse_ino_t ino,
- size_t size, off64_t off, struct fuse_dh *dh,
+ size_t size, loff_t off, struct fuse_dh *dh,
struct fuse_file_info *fi)
{
char *path;
@@ -3472,7 +3485,7 @@ static int readdir_fill(struct fuse *f, fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
- off64_t off, struct fuse_file_info *llfi)
+ loff_t off, struct fuse_file_info *llfi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_file_info fi;
@@ -3995,12 +4008,13 @@ static void fuse_lib_bmap(fuse_req_t req, fuse_ino_t ino, size_t blocksize,
}
static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
- struct fuse_file_info *fi, unsigned int flags,
+ struct fuse_file_info *llfi, unsigned int flags,
const void *in_buf, size_t in_bufsz,
size_t out_bufsz)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_intr_data d;
+ struct fuse_file_info fi;
char *path, *out_buf = NULL;
int err;
@@ -4008,6 +4022,11 @@ static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
if (flags & FUSE_IOCTL_UNRESTRICTED)
goto err;
+ if (flags & FUSE_IOCTL_DIR)
+ get_dirhandle(llfi, &fi);
+ else
+ fi = *llfi;
+
if (out_bufsz) {
err = -ENOMEM;
out_buf = malloc(out_bufsz);
@@ -4025,7 +4044,7 @@ static void fuse_lib_ioctl(fuse_req_t req, fuse_ino_t ino, int cmd, void *arg,
fuse_prepare_interrupt(f, req, &d);
- err = fuse_fs_ioctl(f->fs, path, cmd, arg, fi, flags,
+ err = fuse_fs_ioctl(f->fs, path, cmd, arg, &fi, flags,
out_buf ?: (void *)in_buf);
fuse_finish_interrupt(f, req, &d);
@@ -4062,7 +4081,7 @@ static void fuse_lib_poll(fuse_req_t req, fuse_ino_t ino,
}
static void fuse_lib_fallocate(fuse_req_t req, fuse_ino_t ino, int mode,
- off64_t offset, off64_t length, struct fuse_file_info *fi)
+ loff_t offset, loff_t length, struct fuse_file_info *fi)
{
struct fuse *f = req_fuse_prepare(req);
struct fuse_intr_data d;
@@ -4415,12 +4434,14 @@ static void fuse_lib_help(void)
" -o ac_attr_timeout=T auto cache timeout for attributes (attr_timeout)\n"
" -o noforget never forget cached inodes\n"
" -o remember=T remember cached inodes for T seconds (0s)\n"
+" -o nopath don't supply path if not necessary\n"
" -o intr allow requests to be interrupted\n"
" -o intr_signal=NUM signal to send on interrupt (%i)\n"
" -o modules=M1[:M2...] names of modules to push onto filesystem stack\n"
"\n", FUSE_DEFAULT_INTR_SIGNAL);
}
+#ifdef USE_MODULES
static void fuse_lib_help_modules(void)
{
struct fuse_module *m;
@@ -4440,6 +4461,7 @@ static void fuse_lib_help_modules(void)
}
pthread_mutex_unlock(&fuse_context_lock);
}
+#endif
static int fuse_lib_opt_proc(void *data, const char *arg, int key,
struct fuse_args *outargs)
@@ -4495,7 +4517,7 @@ static void fuse_restore_intr_signal(int signum)
sigaction(signum, &sa, NULL);
}
-
+#ifdef USE_MODULES
static int fuse_push_module(struct fuse *f, const char *module,
struct fuse_args *args)
{
@@ -4518,6 +4540,7 @@ static int fuse_push_module(struct fuse *f, const char *module,
f->utime_omit_ok = newfs->op.flag_utime_omit_ok && f->utime_omit_ok;
return 0;
}
+#endif
struct fuse_fs *fuse_fs_new(const struct fuse_operations *op, size_t op_size,
void *user_data)
@@ -4555,11 +4578,30 @@ static int node_table_init(struct node_table *t)
return 0;
}
+static void thread_exit_handler(int sig)
+{
+ pthread_exit(0);
+}
+
static void *fuse_prune_nodes(void *fuse)
{
struct fuse *f = fuse;
int sleep_time;
+#if defined(__ANDROID__)
+ struct sigaction actions;
+ memset(&actions, 0, sizeof(actions));
+ sigemptyset(&actions.sa_mask);
+ actions.sa_flags = 0;
+ actions.sa_handler = thread_exit_handler;
+ sigaction(SIGUSR1, &actions, NULL);
+
+ sigset_t setusr1;
+ sigemptyset(&setusr1);
+ sigaddset(&setusr1, SIGUSR1);
+ pthread_sigmask(SIG_BLOCK, &setusr1, NULL);
+#endif
+
while(1) {
sleep_time = fuse_clean_cache(f);
sleep(sleep_time);
@@ -4579,10 +4621,10 @@ void fuse_stop_cleanup_thread(struct fuse *f)
{
if (lru_enabled(f)) {
pthread_mutex_lock(&f->lock);
-#ifndef ANDROID
- pthread_cancel(f->prune_thread);
-#else
+#if defined(__ANDROID__)
pthread_kill(f->prune_thread, SIGUSR1);
+#else
+ pthread_cancel(f->prune_thread);
#endif
pthread_mutex_unlock(&f->lock);
pthread_join(f->prune_thread, NULL);
@@ -4637,6 +4679,7 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
fuse_lib_opt_proc) == -1)
goto out_free_fs;
+#ifdef USE_MODULES
if (f->conf.modules) {
char *module;
char *next;
@@ -4651,6 +4694,7 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
goto out_free_fs;
}
}
+#endif
if (!f->conf.ac_attr_timeout_set)
f->conf.ac_attr_timeout = f->conf.attr_timeout;
@@ -4670,8 +4714,10 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
f->se = fuse_lowlevel_new_common(args, &llop, sizeof(llop), f);
if (f->se == NULL) {
+#ifdef USE_MODULES
if (f->conf.help)
fuse_lib_help_modules();
+#endif
goto out_free_fs;
}
@@ -4700,6 +4746,10 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
fprintf(stderr, "fuse: memory allocation failed\n");
goto out_free_id_table;
}
+ if (lru_enabled(f)) {
+ struct node_lru *lnode = node_lru(root);
+ init_list_head(&lnode->lru);
+ }
strcpy(root->inline_name, "/");
root->name = root->inline_name;
@@ -4808,6 +4858,7 @@ static struct fuse *fuse_new_common_compat25(int fd, struct fuse_args *args,
return f;
}
+#ifdef USE_MODULES
/* called with fuse_context_lock held or during initialization (before
main() has been called) */
void fuse_register_module(struct fuse_module *mod)
@@ -4819,6 +4870,7 @@ void fuse_register_module(struct fuse_module *mod)
mod->next = fuse_modules;
fuse_modules = mod;
}
+#endif
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
@@ -4870,11 +4922,11 @@ struct fuse *fuse_new_compat1(int fd, int flags,
11);
}
-FUSE_SYMVER(".symver fuse_exited,__fuse_exited@");
-FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@");
-FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@");
-FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@");
-FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@");
+FUSE_SYMVER(".symver fuse_exited,__fuse_exited@FUSE_UNVERSIONED");
+FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@FUSE_UNVERSIONED");
+FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@FUSE_UNVERSIONED");
+FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@FUSE_UNVERSIONED");
+FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@FUSE_UNVERSIONED");
FUSE_SYMVER(".symver fuse_new_compat22,fuse_new@FUSE_2.2");
#endif /* __FreeBSD__ || __NetBSD__ */
diff --git a/fuse/fuse_i.h b/fuse/fuse_i.h
index 78f14677a..fa3715606 100644
--- a/fuse/fuse_i.h
+++ b/fuse/fuse_i.h
@@ -106,6 +106,8 @@ struct fuse_session *fuse_lowlevel_new_common(struct fuse_args *args,
size_t op_size, void *userdata);
void fuse_kern_unmount_compat22(const char *mountpoint);
+int fuse_chan_clearfd(struct fuse_chan *ch);
+
void fuse_kern_unmount(const char *mountpoint, int fd);
int fuse_kern_mount(const char *mountpoint, struct fuse_args *args);
diff --git a/fuse/fuse_kern_chan.c b/fuse/fuse_kern_chan.c
index 5f77bbf56..4a9beb8f8 100644
--- a/fuse/fuse_kern_chan.c
+++ b/fuse/fuse_kern_chan.c
@@ -77,7 +77,10 @@ static int fuse_kern_chan_send(struct fuse_chan *ch, const struct iovec iov[],
static void fuse_kern_chan_destroy(struct fuse_chan *ch)
{
- close(fuse_chan_fd(ch));
+ int fd = fuse_chan_fd(ch);
+
+ if (fd != -1)
+ close(fd);
}
#define MIN_BUFSIZE 0x21000
diff --git a/fuse/fuse_loop_mt.c b/fuse/fuse_loop_mt.c
index aefc3ec98..90fc1e694 100644
--- a/fuse/fuse_loop_mt.c
+++ b/fuse/fuse_loop_mt.c
@@ -19,7 +19,6 @@
#include <semaphore.h>
#include <errno.h>
#include <sys/time.h>
-#include <pthread.h>
/* Environment var controlling the thread stack size */
#define ENVNAME_THREAD_STACK "FUSE_THREAD_STACK"
@@ -62,16 +61,32 @@ static void list_del_worker(struct fuse_worker *w)
next->prev = prev;
}
-#define PTHREAD_CANCEL_ENABLE 0
-#define PTHREAD_CANCEL_DISABLE 1
-
static int fuse_loop_start_thread(struct fuse_mt *mt);
+static void thread_exit_handler(int sig)
+{
+ pthread_exit(0);
+}
+
static void *fuse_do_work(void *data)
{
struct fuse_worker *w = (struct fuse_worker *) data;
struct fuse_mt *mt = w->mt;
+#if defined(__ANDROID__)
+ struct sigaction actions;
+ memset(&actions, 0, sizeof(actions));
+ sigemptyset(&actions.sa_mask);
+ actions.sa_flags = 0;
+ actions.sa_handler = thread_exit_handler;
+ sigaction(SIGUSR1, &actions, NULL);
+
+ sigset_t setusr1;
+ sigemptyset(&setusr1);
+ sigaddset(&setusr1, SIGUSR1);
+ pthread_sigmask(SIG_BLOCK, &setusr1, NULL);
+#endif
+
while (!fuse_session_exited(mt->se)) {
int isforget = 0;
struct fuse_chan *ch = mt->prevch;
@@ -81,11 +96,15 @@ static void *fuse_do_work(void *data)
};
int res;
-#ifndef ANDROID
+#if defined(__ANDROID__)
+ pthread_sigmask(SIG_UNBLOCK, &setusr1, NULL);
+#else
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
#endif
res = fuse_session_receive_buf(mt->se, &fbuf, &ch);
-#ifndef ANDROID
+#if defined(__ANDROID__)
+ pthread_sigmask(SIG_BLOCK, &setusr1, NULL);
+#else
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
#endif
if (res == -EINTR)
@@ -249,14 +268,15 @@ int fuse_session_loop_mt(struct fuse_session *se)
while (!fuse_session_exited(se))
sem_wait(&mt.finish);
-#ifndef ANDROID
+ pthread_mutex_lock(&mt.lock);
for (w = mt.main.next; w != &mt.main; w = w->next)
- pthread_cancel(w->thread_id);
-#else
- for (w = mt.main.next; w != &mt.main; w = w->next)
+#if defined(__ANDROID__)
pthread_kill(w->thread_id, SIGUSR1);
+#else
+ pthread_cancel(w->thread_id);
#endif
mt.exit = 1;
+ pthread_mutex_unlock(&mt.lock);
while (mt.main.next != &mt.main)
fuse_join_worker(&mt, mt.main.next);
diff --git a/fuse/fuse_lowlevel.c b/fuse/fuse_lowlevel.c
index 103f83154..5f223c98f 100644
--- a/fuse/fuse_lowlevel.c
+++ b/fuse/fuse_lowlevel.c
@@ -24,6 +24,7 @@
#include <limits.h>
#include <errno.h>
#include <assert.h>
+#include <sys/file.h>
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
@@ -247,7 +248,7 @@ size_t fuse_dirent_size(size_t namelen)
}
char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
- off64_t off)
+ loff_t off)
{
unsigned namelen = strlen(name);
unsigned entlen = FUSE_NAME_OFFSET + namelen;
@@ -267,7 +268,7 @@ char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
}
size_t fuse_add_direntry(fuse_req_t req, char *buf, size_t bufsize,
- const char *name, const struct stat *stbuf, off64_t off)
+ const char *name, const struct stat *stbuf, loff_t off)
{
size_t entsize;
@@ -1979,7 +1980,7 @@ int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph)
}
int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
- off64_t off, off64_t len)
+ loff_t off, loff_t len)
{
struct fuse_notify_inval_inode_out outarg;
struct fuse_ll *f;
@@ -2060,7 +2061,7 @@ int fuse_lowlevel_notify_delete(struct fuse_chan *ch,
}
int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
- off64_t offset, struct fuse_bufvec *bufv,
+ loff_t offset, struct fuse_bufvec *bufv,
enum fuse_buf_copy_flags flags)
{
struct fuse_out_header out;
@@ -2144,7 +2145,7 @@ out:
}
int fuse_lowlevel_notify_retrieve(struct fuse_chan *ch, fuse_ino_t ino,
- size_t size, off64_t offset, void *cookie)
+ size_t size, loff_t offset, void *cookie)
{
struct fuse_notify_retrieve_out outarg;
struct fuse_ll *f;
diff --git a/fuse/fuse_mt.c b/fuse/fuse_mt.c
index f6dbe71b2..fd5ac23e5 100644
--- a/fuse/fuse_mt.c
+++ b/fuse/fuse_mt.c
@@ -119,4 +119,4 @@ int fuse_loop_mt(struct fuse *f)
return res;
}
-FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@");
+FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@FUSE_UNVERSIONED");
diff --git a/fuse/fuse_session.c b/fuse/fuse_session.c
index c55f25074..18c8c4249 100644
--- a/fuse/fuse_session.c
+++ b/fuse/fuse_session.c
@@ -182,6 +182,16 @@ int fuse_chan_fd(struct fuse_chan *ch)
return ch->fd;
}
+int fuse_chan_clearfd(struct fuse_chan *ch)
+{
+ if (ch == NULL)
+ return -1;
+
+ int fd = ch->fd;
+ ch->fd = -1;
+ return fd;
+}
+
size_t fuse_chan_bufsize(struct fuse_chan *ch)
{
return ch->bufsize;
diff --git a/fuse/fuse_signals.c b/fuse/fuse_signals.c
index 88ac39e18..353cb24bd 100644
--- a/fuse/fuse_signals.c
+++ b/fuse/fuse_signals.c
@@ -21,13 +21,13 @@ static void exit_handler(int sig)
fuse_session_exit(fuse_instance);
}
-static int set_one_signal_handler(int sig, void (*handler)(int))
+static int set_one_signal_handler(int sig, void (*handler)(int), int remove)
{
struct sigaction sa;
struct sigaction old_sa;
memset(&sa, 0, sizeof(struct sigaction));
- sa.sa_handler = handler;
+ sa.sa_handler = remove ? SIG_DFL : handler;
sigemptyset(&(sa.sa_mask));
sa.sa_flags = 0;
@@ -36,7 +36,7 @@ static int set_one_signal_handler(int sig, void (*handler)(int))
return -1;
}
- if (old_sa.sa_handler == SIG_DFL &&
+ if (old_sa.sa_handler == (remove ? handler : SIG_DFL) &&
sigaction(sig, &sa, NULL) == -1) {
perror("fuse: cannot set signal handler");
return -1;
@@ -46,10 +46,10 @@ static int set_one_signal_handler(int sig, void (*handler)(int))
int fuse_set_signal_handlers(struct fuse_session *se)
{
- if (set_one_signal_handler(SIGHUP, exit_handler) == -1 ||
- set_one_signal_handler(SIGINT, exit_handler) == -1 ||
- set_one_signal_handler(SIGTERM, exit_handler) == -1 ||
- set_one_signal_handler(SIGPIPE, SIG_IGN) == -1)
+ if (set_one_signal_handler(SIGHUP, exit_handler, 0) == -1 ||
+ set_one_signal_handler(SIGINT, exit_handler, 0) == -1 ||
+ set_one_signal_handler(SIGTERM, exit_handler, 0) == -1 ||
+ set_one_signal_handler(SIGPIPE, SIG_IGN, 0) == -1)
return -1;
fuse_instance = se;
@@ -64,9 +64,9 @@ void fuse_remove_signal_handlers(struct fuse_session *se)
else
fuse_instance = NULL;
- set_one_signal_handler(SIGHUP, SIG_DFL);
- set_one_signal_handler(SIGINT, SIG_DFL);
- set_one_signal_handler(SIGTERM, SIG_DFL);
- set_one_signal_handler(SIGPIPE, SIG_DFL);
+ set_one_signal_handler(SIGHUP, exit_handler, 1);
+ set_one_signal_handler(SIGINT, exit_handler, 1);
+ set_one_signal_handler(SIGTERM, exit_handler, 1);
+ set_one_signal_handler(SIGPIPE, SIG_IGN, 1);
}
diff --git a/fuse/fuse_versionscript b/fuse/fuse_versionscript
new file mode 100644
index 000000000..de16ab2e6
--- /dev/null
+++ b/fuse/fuse_versionscript
@@ -0,0 +1,210 @@
+FUSE_UNVERSIONED {
+};
+
+FUSE_2.2 {
+ global:
+ fuse_destroy;
+ fuse_exit;
+ fuse_exited;
+ fuse_invalidate;
+ fuse_is_lib_option;
+ fuse_loop;
+ fuse_loop_mt;
+ fuse_loop_mt_proc;
+ fuse_main;
+ fuse_main_compat1;
+ fuse_main_compat2;
+ fuse_mount_compat1;
+ fuse_new_compat1;
+ fuse_new_compat2;
+ fuse_process_cmd;
+ fuse_read_cmd;
+ fuse_set_getcontext_func;
+ fuse_setup_compat2;
+};
+
+FUSE_2.4 {
+ global:
+ fuse_add_dirent;
+ fuse_chan_bufsize;
+ fuse_chan_data;
+ fuse_chan_destroy;
+ fuse_chan_fd;
+ fuse_chan_receive;
+ fuse_chan_send;
+ fuse_chan_session;
+ fuse_dirent_size;
+ fuse_kern_chan_new;
+ fuse_lowlevel_is_lib_option;
+ fuse_reply_attr;
+ fuse_reply_buf;
+ fuse_reply_entry;
+ fuse_reply_err;
+ fuse_reply_none;
+ fuse_reply_readlink;
+ fuse_reply_write;
+ fuse_reply_xattr;
+ fuse_req_userdata;
+ fuse_session_add_chan;
+ fuse_session_destroy;
+ fuse_session_exit;
+ fuse_session_exited;
+ fuse_session_loop;
+ fuse_session_loop_mt;
+ fuse_session_new;
+ fuse_session_next_chan;
+ fuse_session_process;
+ fuse_session_reset;
+} FUSE_2.2;
+
+FUSE_2.5 {
+ global:
+ fuse_lowlevel_new_compat;
+ fuse_main_real_compat22;
+ fuse_mount_compat22;
+ fuse_new_compat22;
+ fuse_opt_parse;
+ fuse_opt_add_opt;
+ fuse_opt_add_arg;
+ fuse_opt_free_args;
+ fuse_opt_match;
+ fuse_parse_cmdline;
+ fuse_remove_signal_handlers;
+ fuse_reply_create;
+ fuse_reply_open;
+ fuse_reply_open_compat;
+ fuse_reply_statfs;
+ fuse_reply_statfs_compat;
+ fuse_setup_compat22;
+ fuse_set_signal_handlers;
+} FUSE_2.4;
+
+FUSE_2.6 {
+ global:
+ fuse_add_direntry;
+ fuse_chan_new;
+ fuse_chan_new_compat24;
+ fuse_chan_recv;
+ fuse_daemonize;
+ fuse_get_session;
+ fuse_interrupted;
+ fuse_lowlevel_new;
+ fuse_lowlevel_new_compat25;
+ fuse_main_real;
+ fuse_main_real_compat25;
+ fuse_mount;
+ fuse_mount_compat25;
+ fuse_new;
+ fuse_new_compat25;
+ fuse_opt_insert_arg;
+ fuse_reply_lock;
+ fuse_req_interrupt_func;
+ fuse_req_interrupted;
+ fuse_session_remove_chan;
+ fuse_setup;
+ fuse_setup_compat25;
+ fuse_teardown;
+ fuse_teardown_compat22;
+ fuse_unmount;
+ fuse_unmount_compat22;
+} FUSE_2.5;
+
+FUSE_2.7 {
+ global:
+ fuse_fs_access;
+ fuse_fs_bmap;
+ fuse_fs_chmod;
+ fuse_fs_chown;
+ fuse_fs_create;
+ fuse_fs_destroy;
+ fuse_fs_fgetattr;
+ fuse_fs_flush;
+ fuse_fs_fsync;
+ fuse_fs_fsyncdir;
+ fuse_fs_ftruncate;
+ fuse_fs_getattr;
+ fuse_fs_getxattr;
+ fuse_fs_init;
+ fuse_fs_link;
+ fuse_fs_listxattr;
+ fuse_fs_lock;
+ fuse_fs_mkdir;
+ fuse_fs_mknod;
+ fuse_fs_new;
+ fuse_fs_open;
+ fuse_fs_opendir;
+ fuse_fs_read;
+ fuse_fs_readdir;
+ fuse_fs_readlink;
+ fuse_fs_release;
+ fuse_fs_releasedir;
+ fuse_fs_removexattr;
+ fuse_fs_rename;
+ fuse_fs_rmdir;
+ fuse_fs_setxattr;
+ fuse_fs_statfs;
+ fuse_fs_symlink;
+ fuse_fs_truncate;
+ fuse_fs_unlink;
+ fuse_fs_utimens;
+ fuse_fs_write;
+ fuse_register_module;
+ fuse_reply_iov;
+ fuse_version;
+} FUSE_2.6;
+
+FUSE_2.7.5 {
+ global:
+ fuse_reply_bmap;
+} FUSE_2.7;
+
+FUSE_2.8 {
+ global:
+ cuse_lowlevel_new;
+ cuse_lowlevel_main;
+ cuse_lowlevel_setup;
+ cuse_lowlevel_teardown;
+ fuse_fs_ioctl;
+ fuse_fs_poll;
+ fuse_get_context;
+ fuse_getgroups;
+ fuse_lowlevel_notify_inval_entry;
+ fuse_lowlevel_notify_inval_inode;
+ fuse_lowlevel_notify_poll;
+ fuse_notify_poll;
+ fuse_opt_add_opt_escaped;
+ fuse_pollhandle_destroy;
+ fuse_reply_ioctl;
+ fuse_reply_ioctl_iov;
+ fuse_reply_ioctl_retry;
+ fuse_reply_poll;
+ fuse_req_ctx;
+ fuse_req_getgroups;
+ fuse_session_data;
+} FUSE_2.7.5;
+
+FUSE_2.9 {
+ global:
+ fuse_buf_copy;
+ fuse_buf_size;
+ fuse_fs_read_buf;
+ fuse_fs_write_buf;
+ fuse_lowlevel_notify_retrieve;
+ fuse_lowlevel_notify_store;
+ fuse_reply_data;
+ fuse_session_process_buf;
+ fuse_session_receive_buf;
+ fuse_start_cleanup_thread;
+ fuse_stop_cleanup_thread;
+ fuse_clean_cache;
+ fuse_lowlevel_notify_delete;
+ fuse_fs_flock;
+} FUSE_2.8;
+
+FUSE_2.9.1 {
+ global:
+ fuse_fs_fallocate;
+
+ local:
+ *;
+} FUSE_2.9;
diff --git a/fuse/fusexmp.c b/fuse/fusexmp.c
deleted file mode 100644
index d4edbc9ae..000000000
--- a/fuse/fusexmp.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- FUSE: Filesystem in Userspace
- Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
-
- This program can be distributed under the terms of the GNU GPL.
- See the file COPYING.
-
- gcc -Wall `pkg-config fuse --cflags --libs` fusexmp.c -o fusexmp
-*/
-
-#define FUSE_USE_VERSION 26
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef linux
-/* For pread()/pwrite() */
-#define _XOPEN_SOURCE 500
-#endif
-
-#include <fuse.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/time.h>
-#ifdef HAVE_SETXATTR
-#include <sys/xattr.h>
-#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,
- off64_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, off64_t size)
-{
- int res;
-
- res = truncate(path, size);
- if (res == -1)
- return -errno;
-
- return 0;
-}
-
-static int xmp_utimens(const char *path, const struct timespec ts[2])
-{
- int res;
- struct timeval tv[2];
-
- tv[0].tv_sec = ts[0].tv_sec;
- tv[0].tv_usec = ts[0].tv_nsec / 1000;
- tv[1].tv_sec = ts[1].tv_sec;
- tv[1].tv_usec = ts[1].tv_nsec / 1000;
-
- res = utimes(path, tv);
- if (res == -1)
- return -errno;
-
- return 0;
-}
-
-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, off64_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,
- off64_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_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,
- .utimens = xmp_utimens,
- .open = xmp_open,
- .read = xmp_read,
- .write = xmp_write,
- .statfs = xmp_statfs,
- .release = xmp_release,
- .fsync = xmp_fsync,
-#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/fuse/helper.c b/fuse/helper.c
index ace19dd70..c5349bfc0 100644
--- a/fuse/helper.c
+++ b/fuse/helper.c
@@ -249,10 +249,12 @@ struct fuse_chan *fuse_mount(const char *mountpoint, struct fuse_args *args)
static void fuse_unmount_common(const char *mountpoint, struct fuse_chan *ch)
{
- int fd = ch ? fuse_chan_fd(ch) : -1;
- fuse_kern_unmount(mountpoint, fd);
- if (ch)
- fuse_chan_destroy(ch);
+ if (mountpoint) {
+ int fd = ch ? fuse_chan_clearfd(ch) : -1;
+ fuse_kern_unmount(mountpoint, fd);
+ if (ch)
+ fuse_chan_destroy(ch);
+ }
}
void fuse_unmount(const char *mountpoint, struct fuse_chan *ch)
@@ -434,10 +436,10 @@ int fuse_mount_compat1(const char *mountpoint, const char *args[])
return fuse_mount_compat22(mountpoint, NULL);
}
-FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@");
+FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@FUSE_UNVERSIONED");
FUSE_SYMVER(".symver fuse_setup_compat22,fuse_setup@FUSE_2.2");
-FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@");
-FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@");
+FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@FUSE_UNVERSIONED");
+FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@FUSE_UNVERSIONED");
FUSE_SYMVER(".symver fuse_main_real_compat22,fuse_main_real@FUSE_2.2");
#endif /* __FreeBSD__ || __NetBSD__ */
diff --git a/fuse/include/Makefile b/fuse/include/Makefile
deleted file mode 100644
index 43fd00aa8..000000000
--- a/fuse/include/Makefile
+++ /dev/null
@@ -1,515 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# include/Makefile. Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-
-pkgdatadir = $(datadir)/fuse
-pkgincludedir = $(includedir)/fuse
-pkglibdir = $(libdir)/fuse
-pkglibexecdir = $(libexecdir)/fuse
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = i686-pc-linux-gnu
-host_triplet = i686-pc-linux-gnu
-target_triplet = i686-pc-linux-gnu
-subdir = include
-DIST_COMMON = $(fuseinclude_HEADERS) $(include_HEADERS) \
- $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(fuseincludedir)" \
- "$(DESTDIR)$(includedir)"
-HEADERS = $(fuseinclude_HEADERS) $(include_HEADERS) $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /root/fuse-2.8.5/missing --run aclocal-1.11
-AMTAR = ${SHELL} /root/fuse-2.8.5/missing --run tar
-AR = ar
-AUTOCONF = ${SHELL} /root/fuse-2.8.5/missing --run autoconf
-AUTOHEADER = ${SHELL} /root/fuse-2.8.5/missing --run autoheader
-AUTOMAKE = ${SHELL} /root/fuse-2.8.5/missing --run automake-1.11
-AWK = mawk
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFLAGS = -Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing
-CPP = gcc -E
-CPPFLAGS =
-CYGPATH_W = echo
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DSYMUTIL =
-DUMPBIN =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /bin/grep -E
-EXEEXT =
-FGREP = /bin/grep -F
-GREP = /bin/grep
-INIT_D_PATH = /etc/init.d
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LD = /usr/bin/ld
-LDFLAGS =
-LIBICONV =
-LIBOBJS =
-LIBS =
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LIPO =
-LN_S = ln -s
-LTLIBICONV =
-LTLIBOBJS =
-MAKEINFO = ${SHELL} /root/fuse-2.8.5/missing --run makeinfo
-MKDIR_P = /bin/mkdir -p
-MOUNT_FUSE_PATH = /sbin
-NM = /usr/bin/nm -B
-NMEDIT =
-OBJDUMP = objdump
-OBJEXT = o
-OTOOL =
-OTOOL64 =
-PACKAGE = fuse
-PACKAGE_BUGREPORT =
-PACKAGE_NAME = fuse
-PACKAGE_STRING = fuse 2.8.5
-PACKAGE_TARNAME = fuse
-PACKAGE_VERSION = 2.8.5
-PATH_SEPARATOR = :
-RANLIB = ranlib
-SED = /bin/sed
-SET_MAKE =
-SHELL = /bin/bash
-STRIP = strip
-UDEV_RULES_PATH = /etc/udev/rules.d
-VERSION = 2.8.5
-abs_builddir = /root/fuse-2.8.5/include
-abs_srcdir = /root/fuse-2.8.5/include
-abs_top_builddir = /root/fuse-2.8.5
-abs_top_srcdir = /root/fuse-2.8.5
-ac_ct_CC = gcc
-ac_ct_DUMPBIN =
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = ${AMTAR} chof - "$$tardir"
-am__untar = ${AMTAR} xf -
-bindir = ${exec_prefix}/bin
-build = i686-pc-linux-gnu
-build_alias =
-build_cpu = i686
-build_os = linux-gnu
-build_vendor = pc
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-host = i686-pc-linux-gnu
-host_alias =
-host_cpu = i686
-host_os = linux-gnu
-host_vendor = pc
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = ${SHELL} /root/fuse-2.8.5/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-libfuse_libs = -pthread -lrt -ldl
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-lt_ECHO = echo
-mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-pkgconfigdir = ${libdir}/pkgconfig
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-subdirs2 = include lib util example
-sysconfdir = ${prefix}/etc
-target = i686-pc-linux-gnu
-target_alias =
-target_cpu = i686
-target_os = linux-gnu
-target_vendor = pc
-top_build_prefix = ../
-top_builddir = ..
-top_srcdir = ..
-fuseincludedir = $(includedir)/fuse
-fuseinclude_HEADERS = \
- fuse.h \
- fuse_compat.h \
- fuse_common.h \
- fuse_common_compat.h \
- fuse_lowlevel.h \
- fuse_lowlevel_compat.h \
- fuse_opt.h \
- cuse_lowlevel.h
-
-include_HEADERS = old/fuse.h ulockmgr.h
-noinst_HEADERS = fuse_kernel.h
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu include/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status include/config.h
-$(srcdir)/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-fuseincludeHEADERS: $(fuseinclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(fuseincludedir)" || $(MKDIR_P) "$(DESTDIR)$(fuseincludedir)"
- @list='$(fuseinclude_HEADERS)'; test -n "$(fuseincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(fuseincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(fuseincludedir)" || exit $$?; \
- done
-
-uninstall-fuseincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(fuseinclude_HEADERS)'; test -n "$(fuseincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(fuseincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(fuseincludedir)" && rm -f $$files
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(includedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS) config.h
-installdirs:
- for dir in "$(DESTDIR)$(fuseincludedir)" "$(DESTDIR)$(includedir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-fuseincludeHEADERS install-includeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-fuseincludeHEADERS uninstall-includeHEADERS
-
-.MAKE: all install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-fuseincludeHEADERS install-html \
- install-html-am install-includeHEADERS install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-fuseincludeHEADERS \
- uninstall-includeHEADERS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/fuse/include/Makefile.in b/fuse/include/Makefile.in
deleted file mode 100644
index 1ae6d8589..000000000
--- a/fuse/include/Makefile.in
+++ /dev/null
@@ -1,515 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = include
-DIST_COMMON = $(fuseinclude_HEADERS) $(include_HEADERS) \
- $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(fuseincludedir)" \
- "$(DESTDIR)$(includedir)"
-HEADERS = $(fuseinclude_HEADERS) $(include_HEADERS) $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INIT_D_PATH = @INIT_D_PATH@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBICONV = @LTLIBICONV@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MOUNT_FUSE_PATH = @MOUNT_FUSE_PATH@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-UDEV_RULES_PATH = @UDEV_RULES_PATH@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libfuse_libs = @libfuse_libs@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgconfigdir = @pkgconfigdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-subdirs2 = @subdirs2@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-fuseincludedir = $(includedir)/fuse
-fuseinclude_HEADERS = \
- fuse.h \
- fuse_compat.h \
- fuse_common.h \
- fuse_common_compat.h \
- fuse_lowlevel.h \
- fuse_lowlevel_compat.h \
- fuse_opt.h \
- cuse_lowlevel.h
-
-include_HEADERS = old/fuse.h ulockmgr.h
-noinst_HEADERS = fuse_kernel.h
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnu include/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status include/config.h
-$(srcdir)/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-install-fuseincludeHEADERS: $(fuseinclude_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(fuseincludedir)" || $(MKDIR_P) "$(DESTDIR)$(fuseincludedir)"
- @list='$(fuseinclude_HEADERS)'; test -n "$(fuseincludedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(fuseincludedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(fuseincludedir)" || exit $$?; \
- done
-
-uninstall-fuseincludeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(fuseinclude_HEADERS)'; test -n "$(fuseincludedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(fuseincludedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(fuseincludedir)" && rm -f $$files
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
- done
-
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(includedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS) config.h
-installdirs:
- for dir in "$(DESTDIR)$(fuseincludedir)" "$(DESTDIR)$(includedir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-fuseincludeHEADERS install-includeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-fuseincludeHEADERS uninstall-includeHEADERS
-
-.MAKE: all install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-fuseincludeHEADERS install-html \
- install-html-am install-includeHEADERS install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-fuseincludeHEADERS \
- uninstall-includeHEADERS
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/fuse/include/config.h.in b/fuse/include/config.h.in
deleted file mode 100644
index 3e7c14ccb..000000000
--- a/fuse/include/config.h.in
+++ /dev/null
@@ -1,86 +0,0 @@
-/* include/config.h.in. Generated from configure.in by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `fdatasync' function. */
-#undef HAVE_FDATASYNC
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define if you have the iconv() function and it works. */
-#undef HAVE_ICONV
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `setxattr' function. */
-#undef HAVE_SETXATTR
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if `st_atim' is member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_ATIM
-
-/* Define to 1 if `st_atimespec' is member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_ATIMESPEC
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
-
-/* Don't update /etc/mtab */
-#undef IGNORE_MTAB
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
diff --git a/fuse/include/cuse_lowlevel.h b/fuse/include/cuse_lowlevel.h
index d628eac4e..fb445a773 100644
--- a/fuse/include/cuse_lowlevel.h
+++ b/fuse/include/cuse_lowlevel.h
@@ -51,9 +51,9 @@ struct cuse_lowlevel_ops {
void (*init_done) (void *userdata);
void (*destroy) (void *userdata);
void (*open) (fuse_req_t req, struct fuse_file_info *fi);
- void (*read) (fuse_req_t req, size_t size, off64_t off,
+ void (*read) (fuse_req_t req, size_t size, loff_t off,
struct fuse_file_info *fi);
- void (*write) (fuse_req_t req, const char *buf, size_t size, off64_t off,
+ void (*write) (fuse_req_t req, const char *buf, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*flush) (fuse_req_t req, struct fuse_file_info *fi);
void (*release) (fuse_req_t req, struct fuse_file_info *fi);
diff --git a/fuse/include/fuse.h b/fuse/include/fuse.h
index cad816cc4..b82325ec2 100644
--- a/fuse/include/fuse.h
+++ b/fuse/include/fuse.h
@@ -30,9 +30,11 @@
#include <utime.h>
#include <sys/types.h>
#include <sys/stat.h>
+#if defined(__ANDROID__)
+#include <pthread.h>
+#endif
#include <sys/statvfs.h>
#include <sys/uio.h>
-#include <pthread.h>
#ifdef __cplusplus
extern "C" {
@@ -57,7 +59,7 @@ struct fuse_cmd;
* @return 1 if buffer is full, zero otherwise
*/
typedef int (*fuse_fill_dir_t) (void *buf, const char *name,
- const struct stat *stbuf, off64_t off);
+ const struct stat *stbuf, loff_t off);
/* Used by deprecated getdir() method */
typedef struct fuse_dirhandle *fuse_dirh_t;
@@ -146,7 +148,7 @@ struct fuse_operations {
int (*chown) (const char *, uid_t, gid_t);
/** Change the size of a file */
- int (*truncate) (const char *, off64_t);
+ int (*truncate) (const char *, loff_t);
/** Change the access and/or modification times of a file
*
@@ -184,7 +186,7 @@ struct fuse_operations {
*
* Changed in version 2.2
*/
- int (*read) (const char *, char *, size_t, off64_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info *);
/** Write data to an open file
@@ -195,7 +197,7 @@ struct fuse_operations {
*
* Changed in version 2.2
*/
- int (*write) (const char *, const char *, size_t, off64_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info *);
/** Get file system statistics
@@ -302,7 +304,7 @@ struct fuse_operations {
*
* Introduced in version 2.3
*/
- int (*readdir) (const char *, void *, fuse_fill_dir_t, off64_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info *);
/** Release directory
@@ -380,7 +382,7 @@ struct fuse_operations {
*
* Introduced in version 2.5
*/
- int (*ftruncate) (const char *, off64_t, struct fuse_file_info *);
+ int (*ftruncate) (const char *, loff_t, struct fuse_file_info *);
/**
* Get attributes from an open file
@@ -501,6 +503,9 @@ struct fuse_operations {
* _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 (*ioctl) (const char *, int cmd, void *arg,
@@ -534,7 +539,7 @@ struct fuse_operations {
*
* Introduced in version 2.9
*/
- int (*write_buf) (const char *, struct fuse_bufvec *buf, off64_t off,
+ int (*write_buf) (const char *, struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *);
/** Store data from an open file in a buffer
@@ -554,7 +559,7 @@ struct fuse_operations {
* Introduced in version 2.9
*/
int (*read_buf) (const char *, struct fuse_bufvec **bufp,
- size_t size, off64_t off, struct fuse_file_info *);
+ size_t size, loff_t off, struct fuse_file_info *);
/**
* Perform BSD file locking operation
*
@@ -587,7 +592,7 @@ struct fuse_operations {
*
* Introduced in version 2.9.1
*/
- int (*fallocate) (const char *, int, off64_t, off64_t,
+ int (*fallocate) (const char *, int, loff_t, loff_t,
struct fuse_file_info *);
};
@@ -827,14 +832,14 @@ int fuse_fs_release(struct fuse_fs *fs, const char *path,
int fuse_fs_open(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi);
int fuse_fs_read(struct fuse_fs *fs, const char *path, char *buf, size_t size,
- off64_t off, struct fuse_file_info *fi);
+ loff_t off, struct fuse_file_info *fi);
int fuse_fs_read_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec **bufp, size_t size, off64_t off,
+ struct fuse_bufvec **bufp, size_t size, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *buf,
- size_t size, off64_t off, struct fuse_file_info *fi);
+ size_t size, loff_t off, struct fuse_file_info *fi);
int fuse_fs_write_buf(struct fuse_fs *fs, const char *path,
- struct fuse_bufvec *buf, off64_t off,
+ struct fuse_bufvec *buf, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_fsync(struct fuse_fs *fs, const char *path, int datasync,
struct fuse_file_info *fi);
@@ -844,7 +849,7 @@ int fuse_fs_statfs(struct fuse_fs *fs, const char *path, struct statvfs *buf);
int fuse_fs_opendir(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi);
int fuse_fs_readdir(struct fuse_fs *fs, const char *path, void *buf,
- fuse_fill_dir_t filler, off64_t off,
+ fuse_fill_dir_t filler, loff_t off,
struct fuse_file_info *fi);
int fuse_fs_fsyncdir(struct fuse_fs *fs, const char *path, int datasync,
struct fuse_file_info *fi);
@@ -858,8 +863,8 @@ int fuse_fs_flock(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi, int op);
int fuse_fs_chmod(struct fuse_fs *fs, const char *path, mode_t mode);
int fuse_fs_chown(struct fuse_fs *fs, const char *path, uid_t uid, gid_t gid);
-int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off64_t size);
-int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, off64_t size,
+int fuse_fs_truncate(struct fuse_fs *fs, const char *path, loff_t size);
+int fuse_fs_ftruncate(struct fuse_fs *fs, const char *path, loff_t size,
struct fuse_file_info *fi);
int fuse_fs_utimens(struct fuse_fs *fs, const char *path,
const struct timespec tv[2]);
@@ -885,7 +890,7 @@ int fuse_fs_poll(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi, struct fuse_pollhandle *ph,
unsigned *reventsp);
int fuse_fs_fallocate(struct fuse_fs *fs, const char *path, int mode,
- off64_t offset, off64_t length, struct fuse_file_info *fi);
+ loff_t offset, loff_t length, struct fuse_file_info *fi);
void fuse_fs_init(struct fuse_fs *fs, struct fuse_conn_info *conn);
void fuse_fs_destroy(struct fuse_fs *fs);
diff --git a/fuse/include/fuse_common.h b/fuse/include/fuse_common.h
index dab3a569a..f08778bd1 100644
--- a/fuse/include/fuse_common.h
+++ b/fuse/include/fuse_common.h
@@ -28,7 +28,7 @@
#define FUSE_MAKE_VERSION(maj, min) ((maj) * 10 + (min))
#define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION)
-/* This interface uses 64 bit off64_t */
+/* This interface uses 64 bit off_t */
#if _FILE_OFFSET_BITS != 64
#error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
#endif
@@ -372,7 +372,7 @@ struct fuse_buf {
*
* Used if FUSE_BUF_FD_SEEK flag is set.
*/
- off64_t pos;
+ loff_t pos;
};
/**
diff --git a/fuse/include/fuse_compat.h b/fuse/include/fuse_compat.h
index d09323844..b825deebf 100644
--- a/fuse/include/fuse_compat.h
+++ b/fuse/include/fuse_compat.h
@@ -9,6 +9,8 @@
/* these definitions provide source compatibility to prior versions.
Do not include this file directly! */
+#include "fuse_lowlevel.h"
+
struct fuse_operations_compat25 {
int (*getattr) (const char *, struct stat *);
int (*readlink) (const char *, char *, size_t);
@@ -22,12 +24,12 @@ struct fuse_operations_compat25 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off64_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, struct fuse_file_info *);
- int (*read) (const char *, char *, size_t, off64_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info *);
- int (*write) (const char *, const char *, size_t, off64_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info *);
int (*statfs) (const char *, struct statvfs *);
int (*flush) (const char *, struct fuse_file_info *);
@@ -38,7 +40,7 @@ struct fuse_operations_compat25 {
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, off64_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info *);
int (*releasedir) (const char *, struct fuse_file_info *);
int (*fsyncdir) (const char *, int, struct fuse_file_info *);
@@ -46,7 +48,7 @@ struct fuse_operations_compat25 {
void (*destroy) (void *);
int (*access) (const char *, int);
int (*create) (const char *, mode_t, struct fuse_file_info *);
- int (*ftruncate) (const char *, off64_t, struct fuse_file_info *);
+ int (*ftruncate) (const char *, loff_t, struct fuse_file_info *);
int (*fgetattr) (const char *, struct stat *, struct fuse_file_info *);
};
@@ -81,12 +83,12 @@ struct fuse_operations_compat22 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off64_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, struct fuse_file_info_compat *);
- int (*read) (const char *, char *, size_t, off64_t,
+ int (*read) (const char *, char *, size_t, loff_t,
struct fuse_file_info_compat *);
- int (*write) (const char *, const char *, size_t, off64_t,
+ int (*write) (const char *, const char *, size_t, loff_t,
struct fuse_file_info_compat *);
int (*statfs) (const char *, struct statfs *);
int (*flush) (const char *, struct fuse_file_info_compat *);
@@ -97,7 +99,7 @@ struct fuse_operations_compat22 {
int (*listxattr) (const char *, char *, size_t);
int (*removexattr) (const char *, const char *);
int (*opendir) (const char *, struct fuse_file_info_compat *);
- int (*readdir) (const char *, void *, fuse_fill_dir_t, off64_t,
+ int (*readdir) (const char *, void *, fuse_fill_dir_t, loff_t,
struct fuse_file_info_compat *);
int (*releasedir) (const char *, struct fuse_file_info_compat *);
int (*fsyncdir) (const char *, int, struct fuse_file_info_compat *);
@@ -132,11 +134,11 @@ struct fuse_operations_compat2 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off64_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, int);
- int (*read) (const char *, char *, size_t, off64_t);
- int (*write) (const char *, const char *, size_t, off64_t);
+ int (*read) (const char *, char *, size_t, loff_t);
+ int (*write) (const char *, const char *, size_t, loff_t);
int (*statfs) (const char *, struct statfs *);
int (*flush) (const char *);
int (*release) (const char *, int);
@@ -180,11 +182,11 @@ struct fuse_operations_compat1 {
int (*link) (const char *, const char *);
int (*chmod) (const char *, mode_t);
int (*chown) (const char *, uid_t, gid_t);
- int (*truncate) (const char *, off64_t);
+ int (*truncate) (const char *, loff_t);
int (*utime) (const char *, struct utimbuf *);
int (*open) (const char *, int);
- int (*read) (const char *, char *, size_t, off64_t);
- int (*write) (const char *, const char *, size_t, off64_t);
+ int (*read) (const char *, char *, size_t, loff_t);
+ int (*write) (const char *, const char *, size_t, loff_t);
int (*statfs) (struct fuse_statfs_compat1 *);
int (*release) (const char *, int);
int (*fsync) (const char *, int);
diff --git a/fuse/include/fuse_lowlevel.h b/fuse/include/fuse_lowlevel.h
index 36cf26ddf..6971f732e 100644
--- a/fuse/include/fuse_lowlevel.h
+++ b/fuse/include/fuse_lowlevel.h
@@ -462,7 +462,7 @@ struct fuse_lowlevel_ops {
* @param off offset to read from
* @param fi file information
*/
- void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off64_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
/**
@@ -489,7 +489,7 @@ struct fuse_lowlevel_ops {
* @param fi file information
*/
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off64_t off, struct fuse_file_info *fi);
+ size_t size, loff_t off, struct fuse_file_info *fi);
/**
* Flush method
@@ -612,7 +612,7 @@ struct fuse_lowlevel_ops {
* @param off offset to continue reading the directory stream
* @param fi file information
*/
- void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off64_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
/**
@@ -941,7 +941,7 @@ struct fuse_lowlevel_ops {
* @param fi file information
*/
void (*write_buf) (fuse_req_t req, fuse_ino_t ino,
- struct fuse_bufvec *bufv, off64_t off,
+ struct fuse_bufvec *bufv, loff_t off,
struct fuse_file_info *fi);
/**
@@ -959,7 +959,7 @@ struct fuse_lowlevel_ops {
* @param bufv the buffer containing the returned data
*/
void (*retrieve_reply) (fuse_req_t req, void *cookie, fuse_ino_t ino,
- off64_t offset, struct fuse_bufvec *bufv);
+ loff_t offset, struct fuse_bufvec *bufv);
/**
* Forget about multiple inodes
@@ -1015,7 +1015,7 @@ struct fuse_lowlevel_ops {
* see fallocate(2)
*/
void (*fallocate) (fuse_req_t req, fuse_ino_t ino, int mode,
- off64_t offset, off64_t length, struct fuse_file_info *fi);
+ loff_t offset, loff_t length, struct fuse_file_info *fi);
};
/**
@@ -1249,7 +1249,7 @@ 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,
- off64_t off);
+ loff_t off);
/**
* Reply to ask for data fetch and output buffer preparation. ioctl
@@ -1329,12 +1329,16 @@ int fuse_lowlevel_notify_poll(struct fuse_pollhandle *ph);
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
- off64_t off, off64_t len);
+ loff_t off, loff_t len);
/**
* 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.
+ *
* @param ch the channel through which to send the invalidation
* @param parent inode number
* @param name file name
@@ -1349,6 +1353,10 @@ int fuse_lowlevel_notify_inval_entry(struct fuse_chan *ch, fuse_ino_t parent,
* 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.
+ *
* @param ch the channel through which to send the notification
* @param parent inode number
* @param child inode number
@@ -1382,7 +1390,7 @@ int fuse_lowlevel_notify_delete(struct fuse_chan *ch,
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
- off64_t offset, struct fuse_bufvec *bufv,
+ loff_t offset, struct fuse_bufvec *bufv,
enum fuse_buf_copy_flags flags);
/**
* Retrieve data from the kernel buffers
@@ -1410,7 +1418,7 @@ int fuse_lowlevel_notify_store(struct fuse_chan *ch, fuse_ino_t ino,
* @return zero for success, -errno for failure
*/
int fuse_lowlevel_notify_retrieve(struct fuse_chan *ch, fuse_ino_t ino,
- size_t size, off64_t offset, void *cookie);
+ size_t size, loff_t offset, void *cookie);
/* ----------------------------------------------------------- *
diff --git a/fuse/include/fuse_lowlevel_compat.h b/fuse/include/fuse_lowlevel_compat.h
index 78b7c2bd0..f13adbdf3 100644
--- a/fuse/include/fuse_lowlevel_compat.h
+++ b/fuse/include/fuse_lowlevel_compat.h
@@ -9,6 +9,8 @@
/* these definitions provide source compatibility to prior versions.
Do not include this file directly! */
+#include "fuse_common.h"
+
struct fuse_lowlevel_ops_compat25 {
void (*init) (void *userdata);
void (*destroy) (void *userdata);
@@ -33,10 +35,10 @@ struct fuse_lowlevel_ops_compat25 {
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, off64_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off64_t off, struct fuse_file_info *fi);
+ size_t size, loff_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,
@@ -45,7 +47,7 @@ struct fuse_lowlevel_ops_compat25 {
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, off64_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info *fi);
void (*releasedir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info *fi);
@@ -70,7 +72,7 @@ struct fuse_session *fuse_lowlevel_new_compat25(struct fuse_args *args,
size_t fuse_dirent_size(size_t namelen);
char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
- off64_t off);
+ loff_t off);
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
@@ -100,10 +102,10 @@ struct fuse_lowlevel_ops_compat {
const char *newname);
void (*open) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
- void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, off64_t off,
+ void (*read) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info_compat *fi);
void (*write) (fuse_req_t req, fuse_ino_t ino, const char *buf,
- size_t size, off64_t off, struct fuse_file_info_compat *fi);
+ size_t size, loff_t off, struct fuse_file_info_compat *fi);
void (*flush) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
void (*release) (fuse_req_t req, fuse_ino_t ino,
@@ -112,7 +114,7 @@ struct fuse_lowlevel_ops_compat {
struct fuse_file_info_compat *fi);
void (*opendir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
- void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, off64_t off,
+ void (*readdir) (fuse_req_t req, fuse_ino_t ino, size_t size, loff_t off,
struct fuse_file_info_compat *fi);
void (*releasedir) (fuse_req_t req, fuse_ino_t ino,
struct fuse_file_info_compat *fi);
diff --git a/fuse/include/stamp-h1 b/fuse/include/stamp-h1
deleted file mode 100644
index b330768e9..000000000
--- a/fuse/include/stamp-h1
+++ /dev/null
@@ -1 +0,0 @@
-timestamp for include/config.h
diff --git a/fuse/include/sys/statvfs.h b/fuse/include/sys/statvfs.h
deleted file mode 100644
index 6e3e39fd5..000000000
--- a/fuse/include/sys/statvfs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __STATVFS_H
-#define __STATVFS_H
-
-struct statvfs {
- unsigned long f_bsize; /* file system block size */
- unsigned long f_frsize; /* fragment size */
- fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
- fsblkcnt_t f_bfree; /* # free blocks */
- fsblkcnt_t f_bavail; /* # free blocks for non-root */
- fsfilcnt_t f_files; /* # inodes */
- fsfilcnt_t f_ffree; /* # free inodes */
- fsfilcnt_t f_favail; /* # free inodes for non-root */
- unsigned long f_fsid; /* file system ID */
- unsigned long f_flag; /* mount flags */
- unsigned long f_namemax; /* maximum filename length */
-};
-
-#endif
diff --git a/fuse/include/ulockmgr.h b/fuse/include/ulockmgr.h
index ad555799f..c3ceef5d0 100644
--- a/fuse/include/ulockmgr.h
+++ b/fuse/include/ulockmgr.h
@@ -6,6 +6,8 @@
See the file COPYING.LIB.
*/
+#include "fuse_lowlevel.h"
+
#include <stdint.h>
#include <fcntl.h>
#include <sys/types.h>
diff --git a/fuse/modules/iconv.c b/fuse/modules/iconv.c
new file mode 100644
index 000000000..9b78cfd4b
--- /dev/null
+++ b/fuse/modules/iconv.c
@@ -0,0 +1,739 @@
+/*
+ fuse iconv module: file name charset conversion
+ Copyright (C) 2007 Miklos Szeredi <miklos@szeredi.hu>
+
+ This program can be distributed under the terms of the GNU LGPLv2.
+ See the file COPYING.LIB
+*/
+
+#define FUSE_USE_VERSION 26
+
+#include <fuse.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <errno.h>
+#include <iconv.h>
+#include <pthread.h>
+#include <locale.h>
+#include <langinfo.h>
+
+struct iconv {
+ struct fuse_fs *next;
+ pthread_mutex_t lock;
+ char *from_code;
+ char *to_code;
+ iconv_t tofs;
+ iconv_t fromfs;
+};
+
+struct iconv_dh {
+ struct iconv *ic;
+ void *prev_buf;
+ fuse_fill_dir_t prev_filler;
+};
+
+static struct iconv *iconv_get(void)
+{
+ return fuse_get_context()->private_data;
+}
+
+static int iconv_convpath(struct iconv *ic, const char *path, char **newpathp,
+ int fromfs)
+{
+ size_t pathlen;
+ size_t newpathlen;
+ char *newpath;
+ size_t plen;
+ char *p;
+ size_t res;
+ int err;
+
+ if (path == NULL) {
+ *newpathp = NULL;
+ return 0;
+ }
+
+ pathlen = strlen(path);
+ newpathlen = pathlen * 4;
+ newpath = malloc(newpathlen + 1);
+ if (!newpath)
+ return -ENOMEM;
+
+ plen = newpathlen;
+ p = newpath;
+ pthread_mutex_lock(&ic->lock);
+ do {
+ res = iconv(fromfs ? ic->fromfs : ic->tofs, (char **) &path,
+ &pathlen, &p, &plen);
+ if (res == (size_t) -1) {
+ char *tmp;
+ size_t inc;
+
+ err = -EILSEQ;
+ if (errno != E2BIG)
+ goto err;
+
+ inc = (pathlen + 1) * 4;
+ newpathlen += inc;
+ tmp = realloc(newpath, newpathlen + 1);
+ err = -ENOMEM;
+ if (!tmp)
+ goto err;
+
+ p = tmp + (p - newpath);
+ plen += inc;
+ newpath = tmp;
+ }
+ } while (res == (size_t) -1);
+ pthread_mutex_unlock(&ic->lock);
+ *p = '\0';
+ *newpathp = newpath;
+ return 0;
+
+err:
+ iconv(fromfs ? ic->fromfs : ic->tofs, NULL, NULL, NULL, NULL);
+ pthread_mutex_unlock(&ic->lock);
+ free(newpath);
+ return err;
+}
+
+static int iconv_getattr(const char *path, struct stat *stbuf)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_getattr(ic->next, newpath, stbuf);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_fgetattr(const char *path, struct stat *stbuf,
+ struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_fgetattr(ic->next, newpath, stbuf, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_access(const char *path, int mask)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_access(ic->next, newpath, mask);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_readlink(const char *path, char *buf, size_t size)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_readlink(ic->next, newpath, buf, size);
+ if (!err) {
+ char *newlink;
+ err = iconv_convpath(ic, buf, &newlink, 1);
+ if (!err) {
+ strncpy(buf, newlink, size - 1);
+ buf[size - 1] = '\0';
+ free(newlink);
+ }
+ }
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_opendir(const char *path, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_opendir(ic->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_dir_fill(void *buf, const char *name,
+ const struct stat *stbuf, loff_t off)
+{
+ struct iconv_dh *dh = buf;
+ char *newname;
+ int res = 0;
+ if (iconv_convpath(dh->ic, name, &newname, 1) == 0) {
+ res = dh->prev_filler(dh->prev_buf, newname, stbuf, off);
+ free(newname);
+ }
+ return res;
+}
+
+static int iconv_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+ loff_t offset, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ struct iconv_dh dh;
+ dh.ic = ic;
+ dh.prev_buf = buf;
+ dh.prev_filler = filler;
+ err = fuse_fs_readdir(ic->next, newpath, &dh, iconv_dir_fill,
+ offset, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_releasedir(const char *path, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_releasedir(ic->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_mknod(const char *path, mode_t mode, dev_t rdev)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_mknod(ic->next, newpath, mode, rdev);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_mkdir(const char *path, mode_t mode)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_mkdir(ic->next, newpath, mode);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_unlink(const char *path)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_unlink(ic->next, newpath);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_rmdir(const char *path)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_rmdir(ic->next, newpath);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_symlink(const char *from, const char *to)
+{
+ struct iconv *ic = iconv_get();
+ char *newfrom;
+ char *newto;
+ int err = iconv_convpath(ic, from, &newfrom, 0);
+ if (!err) {
+ err = iconv_convpath(ic, to, &newto, 0);
+ if (!err) {
+ err = fuse_fs_symlink(ic->next, newfrom, newto);
+ free(newto);
+ }
+ free(newfrom);
+ }
+ return err;
+}
+
+static int iconv_rename(const char *from, const char *to)
+{
+ struct iconv *ic = iconv_get();
+ char *newfrom;
+ char *newto;
+ int err = iconv_convpath(ic, from, &newfrom, 0);
+ if (!err) {
+ err = iconv_convpath(ic, to, &newto, 0);
+ if (!err) {
+ err = fuse_fs_rename(ic->next, newfrom, newto);
+ free(newto);
+ }
+ free(newfrom);
+ }
+ return err;
+}
+
+static int iconv_link(const char *from, const char *to)
+{
+ struct iconv *ic = iconv_get();
+ char *newfrom;
+ char *newto;
+ int err = iconv_convpath(ic, from, &newfrom, 0);
+ if (!err) {
+ err = iconv_convpath(ic, to, &newto, 0);
+ if (!err) {
+ err = fuse_fs_link(ic->next, newfrom, newto);
+ free(newto);
+ }
+ free(newfrom);
+ }
+ return err;
+}
+
+static int iconv_chmod(const char *path, mode_t mode)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_chmod(ic->next, newpath, mode);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_chown(const char *path, uid_t uid, gid_t gid)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_chown(ic->next, newpath, uid, gid);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_truncate(const char *path, loff_t size)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_truncate(ic->next, newpath, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_ftruncate(const char *path, loff_t size,
+ struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_ftruncate(ic->next, newpath, size, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_utimens(const char *path, const struct timespec ts[2])
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_utimens(ic->next, newpath, ts);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_create(const char *path, mode_t mode,
+ struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_create(ic->next, newpath, mode, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_open_file(const char *path, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_open(ic->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_read_buf(const char *path, struct fuse_bufvec **bufp,
+ size_t size, loff_t offset, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_read_buf(ic->next, newpath, bufp, size, offset, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_write_buf(const char *path, struct fuse_bufvec *buf,
+ loff_t offset, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_write_buf(ic->next, newpath, buf, offset, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_statfs(const char *path, struct statvfs *stbuf)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_statfs(ic->next, newpath, stbuf);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_flush(const char *path, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_flush(ic->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_release(const char *path, struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_release(ic->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_fsync(const char *path, int isdatasync,
+ struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_fsync(ic->next, newpath, isdatasync, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_fsyncdir(const char *path, int isdatasync,
+ struct fuse_file_info *fi)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_fsyncdir(ic->next, newpath, isdatasync, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_setxattr(const char *path, const char *name,
+ const char *value, size_t size, int flags)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_setxattr(ic->next, newpath, name, value, size,
+ flags);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_getxattr(const char *path, const char *name, char *value,
+ size_t size)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_getxattr(ic->next, newpath, name, value, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_listxattr(const char *path, char *list, size_t size)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_listxattr(ic->next, newpath, list, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_removexattr(const char *path, const char *name)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_removexattr(ic->next, newpath, name);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_lock(const char *path, struct fuse_file_info *fi, int cmd,
+ struct flock *lock)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_lock(ic->next, newpath, fi, cmd, lock);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_flock(const char *path, struct fuse_file_info *fi, int op)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_flock(ic->next, newpath, fi, op);
+ free(newpath);
+ }
+ return err;
+}
+
+static int iconv_bmap(const char *path, size_t blocksize, uint64_t *idx)
+{
+ struct iconv *ic = iconv_get();
+ char *newpath;
+ int err = iconv_convpath(ic, path, &newpath, 0);
+ if (!err) {
+ err = fuse_fs_bmap(ic->next, newpath, blocksize, idx);
+ free(newpath);
+ }
+ return err;
+}
+
+static void *iconv_init(struct fuse_conn_info *conn)
+{
+ struct iconv *ic = iconv_get();
+ fuse_fs_init(ic->next, conn);
+ return ic;
+}
+
+static void iconv_destroy(void *data)
+{
+ struct iconv *ic = data;
+ fuse_fs_destroy(ic->next);
+ iconv_close(ic->tofs);
+ iconv_close(ic->fromfs);
+ pthread_mutex_destroy(&ic->lock);
+ free(ic->from_code);
+ free(ic->to_code);
+ free(ic);
+}
+
+static const struct fuse_operations iconv_oper = {
+ .destroy = iconv_destroy,
+ .init = iconv_init,
+ .getattr = iconv_getattr,
+ .fgetattr = iconv_fgetattr,
+ .access = iconv_access,
+ .readlink = iconv_readlink,
+ .opendir = iconv_opendir,
+ .readdir = iconv_readdir,
+ .releasedir = iconv_releasedir,
+ .mknod = iconv_mknod,
+ .mkdir = iconv_mkdir,
+ .symlink = iconv_symlink,
+ .unlink = iconv_unlink,
+ .rmdir = iconv_rmdir,
+ .rename = iconv_rename,
+ .link = iconv_link,
+ .chmod = iconv_chmod,
+ .chown = iconv_chown,
+ .truncate = iconv_truncate,
+ .ftruncate = iconv_ftruncate,
+ .utimens = iconv_utimens,
+ .create = iconv_create,
+ .open = iconv_open_file,
+ .read_buf = iconv_read_buf,
+ .write_buf = iconv_write_buf,
+ .statfs = iconv_statfs,
+ .flush = iconv_flush,
+ .release = iconv_release,
+ .fsync = iconv_fsync,
+ .fsyncdir = iconv_fsyncdir,
+ .setxattr = iconv_setxattr,
+ .getxattr = iconv_getxattr,
+ .listxattr = iconv_listxattr,
+ .removexattr = iconv_removexattr,
+ .lock = iconv_lock,
+ .flock = iconv_flock,
+ .bmap = iconv_bmap,
+
+ .flag_nullpath_ok = 1,
+ .flag_nopath = 1,
+};
+
+static const struct fuse_opt iconv_opts[] = {
+ FUSE_OPT_KEY("-h", 0),
+ FUSE_OPT_KEY("--help", 0),
+ { "from_code=%s", offsetof(struct iconv, from_code), 0 },
+ { "to_code=%s", offsetof(struct iconv, to_code), 1 },
+ FUSE_OPT_END
+};
+
+static void iconv_help(void)
+{
+ char *old = strdup(setlocale(LC_CTYPE, ""));
+ char *charmap = strdup(nl_langinfo(CODESET));
+ setlocale(LC_CTYPE, old);
+ free(old);
+ fprintf(stderr,
+" -o from_code=CHARSET original encoding of file names (default: UTF-8)\n"
+" -o to_code=CHARSET new encoding of the file names (default: %s)\n",
+ charmap);
+ free(charmap);
+}
+
+static int iconv_opt_proc(void *data, const char *arg, int key,
+ struct fuse_args *outargs)
+{
+ (void) data; (void) arg; (void) outargs;
+
+ if (!key) {
+ iconv_help();
+ return -1;
+ }
+
+ return 1;
+}
+
+static struct fuse_fs *iconv_new(struct fuse_args *args,
+ struct fuse_fs *next[])
+{
+ struct fuse_fs *fs;
+ struct iconv *ic;
+ char *old = NULL;
+ const char *from;
+ const char *to;
+
+ ic = calloc(1, sizeof(struct iconv));
+ if (ic == NULL) {
+ fprintf(stderr, "fuse-iconv: memory allocation failed\n");
+ return NULL;
+ }
+
+ if (fuse_opt_parse(args, ic, iconv_opts, iconv_opt_proc) == -1)
+ goto out_free;
+
+ if (!next[0] || next[1]) {
+ fprintf(stderr, "fuse-iconv: exactly one next filesystem required\n");
+ goto out_free;
+ }
+
+ from = ic->from_code ? ic->from_code : "UTF-8";
+ to = ic->to_code ? ic->to_code : "";
+ /* FIXME: detect charset equivalence? */
+ if (!to[0])
+ old = strdup(setlocale(LC_CTYPE, ""));
+ ic->tofs = iconv_open(from, to);
+ if (ic->tofs == (iconv_t) -1) {
+ fprintf(stderr, "fuse-iconv: cannot convert from %s to %s\n",
+ to, from);
+ goto out_free;
+ }
+ ic->fromfs = iconv_open(to, from);
+ if (ic->tofs == (iconv_t) -1) {
+ fprintf(stderr, "fuse-iconv: cannot convert from %s to %s\n",
+ from, to);
+ goto out_iconv_close_to;
+ }
+ if (old) {
+ setlocale(LC_CTYPE, old);
+ free(old);
+ }
+
+ ic->next = next[0];
+ fs = fuse_fs_new(&iconv_oper, sizeof(iconv_oper), ic);
+ if (!fs)
+ goto out_iconv_close_from;
+
+ return fs;
+
+out_iconv_close_from:
+ iconv_close(ic->fromfs);
+out_iconv_close_to:
+ iconv_close(ic->tofs);
+out_free:
+ free(ic->from_code);
+ free(ic->to_code);
+ free(ic);
+ if (old) {
+ setlocale(LC_CTYPE, old);
+ free(old);
+ }
+ return NULL;
+}
+
+FUSE_REGISTER_MODULE(iconv, iconv_new);
diff --git a/fuse/modules/subdir.c b/fuse/modules/subdir.c
new file mode 100644
index 000000000..05b3379af
--- /dev/null
+++ b/fuse/modules/subdir.c
@@ -0,0 +1,697 @@
+/*
+ fuse subdir module: offset paths with a base directory
+ Copyright (C) 2007 Miklos Szeredi <miklos@szeredi.hu>
+
+ This program can be distributed under the terms of the GNU LGPLv2.
+ See the file COPYING.LIB
+*/
+
+#define FUSE_USE_VERSION 26
+
+#include <fuse.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <errno.h>
+
+struct subdir {
+ char *base;
+ size_t baselen;
+ int rellinks;
+ struct fuse_fs *next;
+};
+
+static struct subdir *subdir_get(void)
+{
+ return fuse_get_context()->private_data;
+}
+
+static int subdir_addpath(struct subdir *d, const char *path, char **newpathp)
+{
+ char *newpath = NULL;
+
+ if (path != NULL) {
+ unsigned newlen = d->baselen + strlen(path);
+
+ newpath = malloc(newlen + 2);
+ if (!newpath)
+ return -ENOMEM;
+
+ if (path[0] == '/')
+ path++;
+ strcpy(newpath, d->base);
+ strcpy(newpath + d->baselen, path);
+ if (!newpath[0])
+ strcpy(newpath, ".");
+ }
+ *newpathp = newpath;
+
+ return 0;
+}
+
+static int subdir_getattr(const char *path, struct stat *stbuf)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_getattr(d->next, newpath, stbuf);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_fgetattr(const char *path, struct stat *stbuf,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_fgetattr(d->next, newpath, stbuf, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_access(const char *path, int mask)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_access(d->next, newpath, mask);
+ free(newpath);
+ }
+ return err;
+}
+
+
+static int count_components(const char *p)
+{
+ int ctr;
+
+ for (; *p == '/'; p++);
+ for (ctr = 0; *p; ctr++) {
+ for (; *p && *p != '/'; p++);
+ for (; *p == '/'; p++);
+ }
+ return ctr;
+}
+
+static void strip_common(const char **sp, const char **tp)
+{
+ const char *s = *sp;
+ const char *t = *tp;
+ do {
+ for (; *s == '/'; s++);
+ for (; *t == '/'; t++);
+ *tp = t;
+ *sp = s;
+ for (; *s == *t && *s && *s != '/'; s++, t++);
+ } while ((*s == *t && *s) || (!*s && *t == '/') || (*s == '/' && !*t));
+}
+
+static void transform_symlink(struct subdir *d, const char *path,
+ char *buf, size_t size)
+{
+ const char *l = buf;
+ size_t llen;
+ char *s;
+ int dotdots;
+ int i;
+
+ if (l[0] != '/' || d->base[0] != '/')
+ return;
+
+ strip_common(&l, &path);
+ if (l - buf < (long) d->baselen)
+ return;
+
+ dotdots = count_components(path);
+ if (!dotdots)
+ return;
+ dotdots--;
+
+ llen = strlen(l);
+ if (dotdots * 3 + llen + 2 > size)
+ return;
+
+ s = buf + dotdots * 3;
+ if (llen)
+ memmove(s, l, llen + 1);
+ else if (!dotdots)
+ strcpy(s, ".");
+ else
+ *s = '\0';
+
+ for (s = buf, i = 0; i < dotdots; i++, s += 3)
+ memcpy(s, "../", 3);
+}
+
+
+static int subdir_readlink(const char *path, char *buf, size_t size)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_readlink(d->next, newpath, buf, size);
+ if (!err && d->rellinks)
+ transform_symlink(d, newpath, buf, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_opendir(const char *path, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_opendir(d->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_readdir(const char *path, void *buf,
+ fuse_fill_dir_t filler, loff_t offset,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_readdir(d->next, newpath, buf, filler, offset,
+ fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_releasedir(const char *path, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_releasedir(d->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_mknod(const char *path, mode_t mode, dev_t rdev)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_mknod(d->next, newpath, mode, rdev);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_mkdir(const char *path, mode_t mode)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_mkdir(d->next, newpath, mode);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_unlink(const char *path)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_unlink(d->next, newpath);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_rmdir(const char *path)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_rmdir(d->next, newpath);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_symlink(const char *from, const char *path)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_symlink(d->next, from, newpath);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_rename(const char *from, const char *to)
+{
+ struct subdir *d = subdir_get();
+ char *newfrom;
+ char *newto;
+ int err = subdir_addpath(d, from, &newfrom);
+ if (!err) {
+ err = subdir_addpath(d, to, &newto);
+ if (!err) {
+ err = fuse_fs_rename(d->next, newfrom, newto);
+ free(newto);
+ }
+ free(newfrom);
+ }
+ return err;
+}
+
+static int subdir_link(const char *from, const char *to)
+{
+ struct subdir *d = subdir_get();
+ char *newfrom;
+ char *newto;
+ int err = subdir_addpath(d, from, &newfrom);
+ if (!err) {
+ err = subdir_addpath(d, to, &newto);
+ if (!err) {
+ err = fuse_fs_link(d->next, newfrom, newto);
+ free(newto);
+ }
+ free(newfrom);
+ }
+ return err;
+}
+
+static int subdir_chmod(const char *path, mode_t mode)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_chmod(d->next, newpath, mode);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_chown(const char *path, uid_t uid, gid_t gid)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_chown(d->next, newpath, uid, gid);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_truncate(const char *path, loff_t size)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_truncate(d->next, newpath, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_ftruncate(const char *path, loff_t size,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_ftruncate(d->next, newpath, size, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_utimens(const char *path, const struct timespec ts[2])
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_utimens(d->next, newpath, ts);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_create(const char *path, mode_t mode,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_create(d->next, newpath, mode, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_open(const char *path, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_open(d->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_read_buf(const char *path, struct fuse_bufvec **bufp,
+ size_t size, loff_t offset, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_read_buf(d->next, newpath, bufp, size, offset, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_write_buf(const char *path, struct fuse_bufvec *buf,
+ loff_t offset, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_write_buf(d->next, newpath, buf, offset, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_statfs(const char *path, struct statvfs *stbuf)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_statfs(d->next, newpath, stbuf);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_flush(const char *path, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_flush(d->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_release(const char *path, struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_release(d->next, newpath, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_fsync(const char *path, int isdatasync,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_fsync(d->next, newpath, isdatasync, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_fsyncdir(const char *path, int isdatasync,
+ struct fuse_file_info *fi)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_fsyncdir(d->next, newpath, isdatasync, fi);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_setxattr(const char *path, const char *name,
+ const char *value, size_t size, int flags)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_setxattr(d->next, newpath, name, value, size,
+ flags);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_getxattr(const char *path, const char *name, char *value,
+ size_t size)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_getxattr(d->next, newpath, name, value, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_listxattr(const char *path, char *list, size_t size)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_listxattr(d->next, newpath, list, size);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_removexattr(const char *path, const char *name)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_removexattr(d->next, newpath, name);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_lock(const char *path, struct fuse_file_info *fi, int cmd,
+ struct flock *lock)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_lock(d->next, newpath, fi, cmd, lock);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_flock(const char *path, struct fuse_file_info *fi, int op)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_flock(d->next, newpath, fi, op);
+ free(newpath);
+ }
+ return err;
+}
+
+static int subdir_bmap(const char *path, size_t blocksize, uint64_t *idx)
+{
+ struct subdir *d = subdir_get();
+ char *newpath;
+ int err = subdir_addpath(d, path, &newpath);
+ if (!err) {
+ err = fuse_fs_bmap(d->next, newpath, blocksize, idx);
+ free(newpath);
+ }
+ return err;
+}
+
+static void *subdir_init(struct fuse_conn_info *conn)
+{
+ struct subdir *d = subdir_get();
+ fuse_fs_init(d->next, conn);
+ return d;
+}
+
+static void subdir_destroy(void *data)
+{
+ struct subdir *d = data;
+ fuse_fs_destroy(d->next);
+ free(d->base);
+ free(d);
+}
+
+static const struct fuse_operations subdir_oper = {
+ .destroy = subdir_destroy,
+ .init = subdir_init,
+ .getattr = subdir_getattr,
+ .fgetattr = subdir_fgetattr,
+ .access = subdir_access,
+ .readlink = subdir_readlink,
+ .opendir = subdir_opendir,
+ .readdir = subdir_readdir,
+ .releasedir = subdir_releasedir,
+ .mknod = subdir_mknod,
+ .mkdir = subdir_mkdir,
+ .symlink = subdir_symlink,
+ .unlink = subdir_unlink,
+ .rmdir = subdir_rmdir,
+ .rename = subdir_rename,
+ .link = subdir_link,
+ .chmod = subdir_chmod,
+ .chown = subdir_chown,
+ .truncate = subdir_truncate,
+ .ftruncate = subdir_ftruncate,
+ .utimens = subdir_utimens,
+ .create = subdir_create,
+ .open = subdir_open,
+ .read_buf = subdir_read_buf,
+ .write_buf = subdir_write_buf,
+ .statfs = subdir_statfs,
+ .flush = subdir_flush,
+ .release = subdir_release,
+ .fsync = subdir_fsync,
+ .fsyncdir = subdir_fsyncdir,
+ .setxattr = subdir_setxattr,
+ .getxattr = subdir_getxattr,
+ .listxattr = subdir_listxattr,
+ .removexattr = subdir_removexattr,
+ .lock = subdir_lock,
+ .flock = subdir_flock,
+ .bmap = subdir_bmap,
+
+ .flag_nullpath_ok = 1,
+ .flag_nopath = 1,
+};
+
+static const struct fuse_opt subdir_opts[] = {
+ FUSE_OPT_KEY("-h", 0),
+ FUSE_OPT_KEY("--help", 0),
+ { "subdir=%s", offsetof(struct subdir, base), 0 },
+ { "rellinks", offsetof(struct subdir, rellinks), 1 },
+ { "norellinks", offsetof(struct subdir, rellinks), 0 },
+ FUSE_OPT_END
+};
+
+static void subdir_help(void)
+{
+ fprintf(stderr,
+" -o subdir=DIR prepend this directory to all paths (mandatory)\n"
+" -o [no]rellinks transform absolute symlinks to relative\n");
+}
+
+static int subdir_opt_proc(void *data, const char *arg, int key,
+ struct fuse_args *outargs)
+{
+ (void) data; (void) arg; (void) outargs;
+
+ if (!key) {
+ subdir_help();
+ return -1;
+ }
+
+ return 1;
+}
+
+static struct fuse_fs *subdir_new(struct fuse_args *args,
+ struct fuse_fs *next[])
+{
+ struct fuse_fs *fs;
+ struct subdir *d;
+
+ d = calloc(1, sizeof(struct subdir));
+ if (d == NULL) {
+ fprintf(stderr, "fuse-subdir: memory allocation failed\n");
+ return NULL;
+ }
+
+ if (fuse_opt_parse(args, d, subdir_opts, subdir_opt_proc) == -1)
+ goto out_free;
+
+ if (!next[0] || next[1]) {
+ fprintf(stderr, "fuse-subdir: exactly one next filesystem required\n");
+ goto out_free;
+ }
+
+ if (!d->base) {
+ fprintf(stderr, "fuse-subdir: missing 'subdir' option\n");
+ goto out_free;
+ }
+
+ if (d->base[0] && d->base[strlen(d->base)-1] != '/') {
+ char *tmp = realloc(d->base, strlen(d->base) + 2);
+ if (!tmp) {
+ fprintf(stderr, "fuse-subdir: memory allocation failed\n");
+ goto out_free;
+ }
+ d->base = tmp;
+ strcat(d->base, "/");
+ }
+ d->baselen = strlen(d->base);
+ d->next = next[0];
+ fs = fuse_fs_new(&subdir_oper, sizeof(subdir_oper), d);
+ if (!fs)
+ goto out_free;
+ return fs;
+
+out_free:
+ free(d->base);
+ free(d);
+ return NULL;
+}
+
+FUSE_REGISTER_MODULE(subdir, subdir_new);
diff --git a/fuse/mount.c b/fuse/mount.c
index af7218fa4..eb0bb17d3 100644
--- a/fuse/mount.c
+++ b/fuse/mount.c
@@ -36,13 +36,16 @@
#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"
+#if defined(__ANDROID__) && !defined(FUSERMOUNT_DIR)
+# define FUSERMOUNT_DIR "/system/xbin"
+#endif
+
#ifndef HAVE_FORK
#define fork() vfork()
#endif
@@ -138,7 +141,6 @@ static void mount_help(void)
"\n");
}
-#define FUSERMOUNT_DIR "/usr/bin"
static void exec_fusermount(const char *argv[])
{
execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv);
@@ -302,14 +304,18 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
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;
-
- /* Need to close file descriptor, otherwise synchronous umount
- would recurse into filesystem, and deadlock */
- close(fd);
}
if (geteuid() == 0) {
@@ -465,7 +471,7 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
return -1;
}
- snprintf(tmp, sizeof(tmp), "fd=%i,rootmode=%o,user_id=%i,group_id=%i",
+ 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);
diff --git a/fuse/mount_bsd.c b/fuse/mount_bsd.c
index 62443ac25..3aec3e3eb 100644
--- a/fuse/mount_bsd.c
+++ b/fuse/mount_bsd.c
@@ -228,18 +228,21 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
(void)mountpoint;
if (fstat(fd, &sbuf) == -1)
- return;
+ goto out;
devname_r(sbuf.st_rdev, S_IFCHR, dev, 128);
if (strncmp(dev, "fuse", 4))
- return;
+ goto out;
strtol(dev + 4, &ep, 10);
if (*ep != '\0')
- return;
+ goto out;
do_unmount(dev, fd);
+
+out:
+ close(fd);
}
/* Check if kernel is doing init in background */
diff --git a/fuse/mount_util.c b/fuse/mount_util.c
index bfd801fff..020b223dc 100644
--- a/fuse/mount_util.c
+++ b/fuse/mount_util.c
@@ -16,16 +16,23 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <mntent.h>
#include <paths.h>
+#ifndef __NetBSD__
+#include <mntent.h>
+#endif
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/mount.h>
#include <sys/param.h>
+#if defined(__ANDROID__)
+#include <paths.h>
+#endif
#ifdef __NetBSD__
#define umount2(mnt, flags) unmount(mnt, (flags == 2) ? MNT_FORCE : 0)
#define mtab_needs_update(mnt) 0
+#elif defined(__ANDROID__)
+#define mtab_needs_update(mnt) 0
#else
static int mtab_needs_update(const char *mnt)
{
@@ -94,10 +101,12 @@ static int add_mount(const char *progname, const char *fsname,
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
- "-f", "-t", type, "-o", opts, fsname, mnt, NULL);
+ execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
+ "-f", "-t", type, "-o", opts, fsname, mnt, NULL, &env);
fprintf(stderr, "%s: failed to execute /bin/mount: %s\n",
progname, strerror(errno));
exit(1);
@@ -145,10 +154,17 @@ static int exec_umount(const char *progname, const char *rel_mnt, int lazy)
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/umount", "/bin/umount", "-i", rel_mnt,
- lazy ? "-l" : NULL, NULL);
+ if (lazy) {
+ execle("/bin/umount", "/bin/umount", "-i", rel_mnt,
+ "-l", NULL, &env);
+ } else {
+ execle("/bin/umount", "/bin/umount", "-i", rel_mnt,
+ NULL, &env);
+ }
fprintf(stderr, "%s: failed to execute /bin/umount: %s\n",
progname, strerror(errno));
exit(1);
@@ -204,10 +220,12 @@ static int remove_mount(const char *progname, const char *mnt)
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/umount", "/bin/umount", "--no-canonicalize", "-i",
- "--fake", mnt, NULL);
+ execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i",
+ "--fake", mnt, NULL, &env);
fprintf(stderr, "%s: failed to execute /bin/umount: %s\n",
progname, strerror(errno));
exit(1);
@@ -300,7 +318,7 @@ char *fuse_mnt_resolve_path(const char *progname, const char *orig)
}
int fuse_mnt_check_empty(const char *progname, const char *mnt,
- mode_t rootmode, off64_t rootsize)
+ mode_t rootmode, loff_t rootsize)
{
int isempty = 1;
diff --git a/fuse/mount_util.h b/fuse/mount_util.h
index f89c1154d..0e0f564d7 100644
--- a/fuse/mount_util.h
+++ b/fuse/mount_util.h
@@ -15,5 +15,5 @@ int fuse_mnt_umount(const char *progname, const char *abs_mnt,
const char *rel_mnt, int lazy);
char *fuse_mnt_resolve_path(const char *progname, const char *orig);
int fuse_mnt_check_empty(const char *progname, const char *mnt,
- mode_t rootmode, off64_t rootsize);
+ mode_t rootmode, loff_t rootsize);
int fuse_mnt_check_fuseblk(void);
diff --git a/fuse/ulockmgr.c b/fuse/ulockmgr.c
index f0523ae70..ebd68c6a7 100644
--- a/fuse/ulockmgr.c
+++ b/fuse/ulockmgr.c
@@ -356,10 +356,10 @@ static uint32_t owner_hash(const unsigned char *id, size_t id_len)
static int ulockmgr_canonicalize(int fd, struct flock *lock)
{
- off64_t offset;
+ loff_t offset;
if (lock->l_whence == SEEK_CUR) {
offset = lseek(fd, 0, SEEK_CUR);
- if (offset == (off64_t) -1)
+ if (offset == (loff_t) -1)
return -errno;
} else if (lock->l_whence == SEEK_END) {
struct stat stbuf;