History log of /haiku/src/add-ons/kernel/file_systems/userlandfs/server/fuse/Jamfile
Revision Date Author Comments
# 899e0ef8 01-Jul-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

userlandfs: use std::bitset for FSCapabilities

gcc 13 is confused by the custom bitset implementation, so use the C++
standard one instead.

However, this results in including the C++ <string> header in kernel
code. This doesn't work for gcc2, because of two problems:

- That header includes a declaration of atomic_add that doesn't match
the one in SupportsDefs.h (which can in some cases replace the function
with a #define for an inline version). Adjust the header to use the
be a problem because it creates a risk of circular inclusions.
Standard C++ headers shouldn't depend on BeAPI ones.
- It also leads to the inclusion of iostream which defined lock and
unlock functions in the global namespace. We don't want these, and they
are not part of the C++ standard, so just remove them.

Ideally we could use std::hash for the GetHashCode implementation, but
that doesn't work because it depends on an helper function that's in
libstdc++, and we can't link that from kernel add-ons.

Change-Id: Iee07280beb4dddf7a9b6160e37f3b816e4de89ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6663
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 0604d554 06-Jun-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

userlandfs: compatibility with FUSE 2.9 and FUSE lowlevel API

- Import latest version of files from FUSE 2.9.9 (our last
synchronization was with 2.7.4)
- Adjust fuse pkgconfig file to use the POSIX error mapper
automatically, since that's required for all FUSE software
- Implement the lowlevel API in addition to the highlevel one. The
lowlevel API uses inode numbers to identify files, rather than paths,
making it a better fit to the userlandfs architecture.

The FUSE 2.x branch is not maintained anymore by FUSE developers,
however, pretty much no one migrated to FUSE 3.x. So it is more
interesting to implement, rather than 3.x.

Confirmed still working with sshfs and curlftpfs.

Example use:

I tested this with github.com/whoozle/android-file-transfer-linux

- Build the fuse library and copy it to ~/config/non-packaged/add-ons/userlandfs/
- Start the server: /system/servers/userlandfs_server aft-mtp-mount
- Connect your Android phone and put it in USB file transfer mode
- Mount the device: mount -t userlandfs -p 'aft-mtp-mount /boot/home/MyPhone -d -o use_ino' ~/MyPhone
- You can now access your phone data

Change-Id: Ic3efda7ffbc33737e6f4958428fb3ec9939ef105
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5198
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# eabd8bf7 20-May-2018 Augustin Cavalier <waddlesplash@gmail.com>

fuse: Fix build under gcc6+

* GCC6+ will warn when you truncate potentally "too much data"
Volume name 255. fName is 32.
* We don't think we care enough to enlarge fName?

Change-Id: I6f453ee62c856481605594b2ae5ff9ab41244bd1


# 6ced9245 11-Feb-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

FUSE compat: add MIME type faking

* Add special handling for reading the BEOS:TYPE attribute to supply
on-the-fly fake MIME types for FUSE module filesystems, the same
way it's done in our FAT and NTFS FS modules

* Reuse the mime_ext_table which we already have and put it into a
shared location so we don't get further extra copies of it


# 8028ede7 15-Jan-2016 Rene Gollent <rene@gollent.com>

Build: Add architecture rule for libshared.a.

- As suggested by Ingo, add libshared.a to the architecture name map.
This allows it to be linked by its short name like other frequently
used libraries.
- Adjust all Jamfiles referencing the lib accordingly.


# 220d0402 31-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Use libstdc++, libsupc++ and libgcc from gcc_syslibs.

* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
necessary since we're only using libgcc-as-single-object for libroot
with x86_gcc2, where the filtered object file doesn't exist. Should
the objects that used to be filtered cause any problems as part of
libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
x86_gcc2, we still build libstdc++.so from the sources in the Haiku
source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.


# 16d5c24e 07-Jul-2009 Oliver Tappe <zooey@hirschkaefer.de>

* merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 39f2d9e6 31-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Parse the FUSE library options. They aren't used yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a7977354 30-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added minimal config.h.
* Added FUSE option parsing to the build -- small changes to get it building.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29813 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fde6bf44 24-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Preparations for write support: Added a locking to the existing hooks. We
need to make sure that the paths of nodes don't change while we're meddling
with them. We read-lock the directories up to the root directory for that
purpose.
* Added missing locking for directory and attribute directory cookies.
We have to do that, since concurrent readdir()s on the same dir handle are
possible and we write-access the cookie data in such a case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f06f7337 19-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* More work on the file system initialization. Mounting/unmounting works now
with sshfs.
* Added basic node and entry management, which we need, since the FUSE
interface works with paths only, while our VFS plays with node IDs and
node cookies.
* Implemented most of the mandatory hooks (vnode operations, lookup, read stat,
open/close/read dir). I was hoping to get directory listings with sshfs now,
but as I had to find out, it implements the deprecated getdir() while we
only support the new {open,read,release}dir() interface yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d077f83 19-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added "fuse_api.h" header wrapping the inclusion of <fuse.h>.
* Implemented the fuse_fs_*() functions.
* More work on the initialization procedure for the client file system. We do
now start a separate thread which calls the main() function. It won't return
from fuse_main_real() until unmounting the FS. We create a fuse_fs structure
and call the client FS initialization and cleanup hooks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29613 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9323289 18-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added FileSystem and Volume subclasses for the FUSE interface. ATM they are
mostly skeletons, doing a bit of initialization.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29604 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ea1d00e 18-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added library for FUSE support. Contains only a few empty stubs ATM. It is
sufficient to build sshfs-fuse, though. Obviously it doesn't actually work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29595 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 220d04022750f40f8bac8f01fa551211e28d04f2 31-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Use libstdc++, libsupc++ and libgcc from gcc_syslibs.

* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
necessary since we're only using libgcc-as-single-object for libroot
with x86_gcc2, where the filtered object file doesn't exist. Should
the objects that used to be filtered cause any problems as part of
libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
x86_gcc2, we still build libstdc++.so from the sources in the Haiku
source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.


# 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e 07-Jul-2009 Oliver Tappe <zooey@hirschkaefer.de>

* merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 39f2d9e66b76c701467bb211a0229ee63fced5a5 31-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Parse the FUSE library options. They aren't used yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a79773546fc6078cc42c41b19ff76ca2626eac6b 30-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added minimal config.h.
* Added FUSE option parsing to the build -- small changes to get it building.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29813 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fde6bf44b10d066b34bb97daa5c4a62417df995e 24-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Preparations for write support: Added a locking to the existing hooks. We
need to make sure that the paths of nodes don't change while we're meddling
with them. We read-lock the directories up to the root directory for that
purpose.
* Added missing locking for directory and attribute directory cookies.
We have to do that, since concurrent readdir()s on the same dir handle are
possible and we write-access the cookie data in such a case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f06f733751a4f6013ba903906e0b6302f37e3413 19-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* More work on the file system initialization. Mounting/unmounting works now
with sshfs.
* Added basic node and entry management, which we need, since the FUSE
interface works with paths only, while our VFS plays with node IDs and
node cookies.
* Implemented most of the mandatory hooks (vnode operations, lookup, read stat,
open/close/read dir). I was hoping to get directory listings with sshfs now,
but as I had to find out, it implements the deprecated getdir() while we
only support the new {open,read,release}dir() interface yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d077f8397a3a222cf62d3c197ad5af5bfb48967 19-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added "fuse_api.h" header wrapping the inclusion of <fuse.h>.
* Implemented the fuse_fs_*() functions.
* More work on the initialization procedure for the client file system. We do
now start a separate thread which calls the main() function. It won't return
from fuse_main_real() until unmounting the FS. We create a fuse_fs structure
and call the client FS initialization and cleanup hooks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29613 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c93232896fd255f40f571e1a88c66bd34ebbef16 18-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added FileSystem and Volume subclasses for the FUSE interface. ATM they are
mostly skeletons, doing a bit of initialization.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29604 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ea1d00edb6773868fc2d0d3b3014236b8eae389 18-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added library for FUSE support. Contains only a few empty stubs ATM. It is
sufficient to build sshfs-fuse, though. Obviously it doesn't actually work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29595 a95241bf-73f2-0310-859d-f6bbb57e9c96