Commit Graph

138 Commits

Author SHA1 Message Date
christos 38a0431bfa Restore binary compatibility by using the statvfs90 structure internally. 2019-09-23 12:00:57 +00:00
wiz 6bd7c569be Avoid marking up semicolons. 2019-04-11 06:18:43 +00:00
maya 0757802169 Use the equivalent FUSE_VERSION. Probably a more adequately named macro for this 2019-04-10 21:42:52 +00:00
maya 090799ffb6 provide fuse_version 2019-04-10 21:38:02 +00:00
pho 82c0423db2 fuse_main(3): Support general fuse options via fuse_parse_cmdline(3)
* Prototypes for fuse_new(3), fuse_mount(3), and fuse_unmount(3) now
  matches to the original fuse interface.

* Add fuse_daemonize(3): needs to have a different prototype,
  otherwise we can't use puffs_daemon(3).

* Remove fuse_setup(3) and fuse_teardown(3). These obsolete functions
  has already been removed from the original interface.

* fuse_main(3) now supports the following command-line options
  compatible with the original fuse:

  -h, --help      print help message
  -V, --version   print library version (currently does nothing)
  -d, -o debug    enable debug output (PUFFS_FLAG_OPDUMP), implies -f
  -f              foreground mode
  -s              single threaded mode (always enabled for now)
  -o fsname=NAME  explicitly set the name of the file system

* fuse_main(3) now daemonizes the process by default. This is for the
  compatibility with the original fuse.
2016-11-20 13:28:32 +00:00
pho 0e4f248f77 fuse_lowlevel.h: new file, currently only contains fuse_parse_cmdline(3) and struct fuse_cmdline_opts 2016-11-20 13:26:28 +00:00
pho 12a2d5638d Change the way how puffs_fuse_node_create() behaves.
In puffs "create" and "open" are two separate operations with
atomicity achieved by locking the parent vnode. In fuse, on the other
hand, "create" is actually a create-and-open-atomically and the open
flags (O_RDWR, O_APPEND, ...) are passed via fi.flags. So the only way
to emulate the fuse semantics is to open the file with dummy flags and
then immediately close it.

You might think that we could simply use fuse->op.mknod all the time
but no, that's not possible because most file systems nowadays expect
op.mknod to be called only for non-regular files and many don't even
support it.
2016-11-17 14:20:25 +00:00
pho fd86259521 Major rework of fuse_opt_parse(3) so that it supports all the functionality of the original function 2016-11-16 16:11:42 +00:00
pho 5ae81a5b54 fuse_opt_match(3): Support every form of templates, not just the simple strcmp case
Also it should return 1 for successful matches, not the way around.
2016-11-15 00:34:19 +00:00
pho 8a68fd4cd6 Add missing macros 2016-11-14 17:48:57 +00:00
pho 111da591d5 Implement missing fuse_opt_add_opt(3) and fuse_opt_add_opt_escaped(3) 2016-11-14 17:19:29 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
dholland f4816d95e4 Needs stdint.h. 2016-01-22 22:39:29 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
tron 16ff83dd36 FUSE seems to allow short writes without errors but PUFFS doesn't. Work
around this by returning ENOSPC in case of a short write to avoid protocol
errors. This change is based on problem analysis provided by Antti Kantee.

This fixes PR lib/45129 by myself.
2012-12-30 10:04:22 +00:00
matt fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
manu a1beaff4aa Set eofflag in puffs_fuse_node_readdir() from librefuse.
From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:56:22 +00:00
tron c15a9046d9 Call the FUSE init operation before we try to access the file-system.
This prevents a crash in "fuse_ext2" which I previously worked around
with a patch.
2011-07-09 17:16:46 +00:00
tron d606648b9f Don't ignore "userdata" argument in "fuse_main_real". This can crash
a FUSE file-system that passes a non-NULL argument here.
2011-07-09 14:50:00 +00:00
soda fd45f5444a fuse_opt_parse() was using uninitialized struct fuse_opt_option::data,
this bug made fuse_opt_proc_t not work, if it used first ``data'' argument,
and might cause memory corruption even.
2011-03-01 11:23:42 +00:00
pooka 0eb828b571 bump major of libs NEEDING libpuffs 2010-05-21 10:53:41 +00:00
christos 0852251407 PR/41250: David H. Gutteridge: librefuse fuse_opt.h header doesn't accommodate
C++ compilation
2009-04-19 22:25:29 +00:00
msaitoh 16ed711ed3 fix typo (s/stucture/structure/) 2009-03-05 01:21:57 +00:00
lukem db4cbbf2f6 sign-compare fix 2009-01-26 04:00:40 +00:00
lukem 6bb2880ee0 fix -Wsign-compare issue 2009-01-19 09:56:06 +00:00
christos 46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +00:00
dillo 2a16dc1a4e Add API version 2.6 variant of fuse_setup.
Reviewed by agc.
2008-08-01 15:54:09 +00:00
pooka 86499e8154 Remove puffs_ops from fuse_operations, no reason for it to be there. 2008-01-14 20:46:11 +00:00
pooka aa3b40df48 return -ret from statfs 2008-01-14 16:07:00 +00:00
pooka cb36cc5493 Uncommit accidentally committed PUFFS_FLAG_OPDUMP.
overextensive library verbosity noticed by riz
2007-12-27 11:39:06 +00:00
xtraeme c747551b64 puffs_fuse_node_create: if create() is specified set S_IFREG explicitly
to avoid passing unspecified mode. Fixes latest ntfs-3g... patch
from pooka tested by myself.
2007-12-12 16:37:56 +00:00
pooka 21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka 6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
pooka 6b61e56541 I've written more than a fair share of this to see my name up in
lights.  Wine & women, come to me now!
2007-11-08 17:08:46 +00:00
pooka 4b0f2948e2 Pull the daemonizing code out of the library mainloop into the file
servers.  Calling daemon() (i.e. fork()ing) inside a library can
cause nice surprises for e.g. threaded programs.  As discussed with
Greg Oster & others.
2007-11-05 17:48:17 +00:00
pooka 02a45a4a7c Header cleanup: don't need defs.h to do a few includes for us. Also,
use #include <> for global headers instead of #include "".
2007-11-05 13:41:52 +00:00
pooka 8f078f842e * Fix pthread key creation to depend on if it hasn't been created before
instead of depending if a lock was succesfully acquired.  Also, add
  a comment explaining why it is such complex (for all I could guess).
* replace err()'s with abort()
* replace some abort()'s by returning failure
2007-11-05 13:38:27 +00:00
pooka 9038ffc17c Use puffs prepost ops for setting pid/lwpid instead of separate
calls in all methods.
2007-10-28 18:41:54 +00:00
pooka e955e253d7 revert 1.77, MULTITHREADED_REFUSE has problems 2007-10-23 17:19:19 +00:00
pooka c683f6f6b5 Get rid of MULTITHREADED_REFUSE for context queries. We can simply
use the pthread codepaths always.
2007-10-21 16:46:52 +00:00
pooka a3e1355fe5 Use new puffs features to provide correct caller info instead of
sometimes returning stale data.
2007-10-21 14:36:35 +00:00
xtraeme 8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
pooka 12e401bc1a Add refuse paper to SEE ALSO 2007-09-24 00:22:25 +00:00
pooka ec5345d9bc Now that we don't dump operations by default, might as well detach
from the console by default also.  (but still would be nice if someone
provided options to toggle these using the fuse options framework)
2007-08-25 12:03:59 +00:00
pooka 306d09812c In case a file system doesn't provide st_blksize, default to DEV_BSIZE. 2007-08-12 15:32:39 +00:00
pooka d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
pooka ff87a004d6 Don't stay on the foreground and dump operations by default.
XXX: someone(tm) should make it possible to set PUFFS_OPFLAG_DUMP
using the fuse options framework
2007-07-18 22:05:41 +00:00
pooka 08db7d7534 * add mntfromname parameter to puffs_init()
* set it in file servers
2007-07-17 11:34:51 +00:00
pooka 6596e0c995 adapt: **newnode etc. pointers -> struct puffs_newinfo 2007-07-01 18:40:15 +00:00