Commit Graph

126 Commits

Author SHA1 Message Date
pooka
e8d4536f16 in create, if op.create doesn't exist, try op.mknod instead 2007-02-18 20:38:07 +00:00
pooka
a24db39ba5 move getdir() location to match layout of real fuse operations 2007-02-18 18:47:40 +00:00
agc
3d88835937 Added extra functionality:
fuse_opt_free_args()

	fuse_exit()

Both from Juan RP - thanks!
2007-02-18 17:44:57 +00:00
pooka
6f8e93a61f support some more fuse interfaces required for setattr:
utimens, utime, truncate and ftruncate
2007-02-18 00:01:18 +00:00
wiz
c3ab7ea8ed Remove superfluous Pp. Fix xref target. 2007-02-17 08:40:36 +00:00
pooka
eb8b0d493d LIBDPLIBS on puffs 2007-02-16 15:44:37 +00:00
pooka
9212590495 * can't call unlink(2) & rmdir(2) in error paths. Rather, call
ops specified in the fuse op vector (or, if they're missing,
  we're SOL)
* great return value overhaul: return -ret to get linuxy -errno
  right for the kernel
2007-02-16 00:35:06 +00:00
pooka
c18a22fa1f write to end-of-file in case of IOAPPEND 2007-02-16 00:16:39 +00:00
pooka
8d87a172a3 * first stab at create
* return proper return values from read/write
2007-02-16 00:13:02 +00:00
pooka
33cad1c7b0 No need to set read, readdir and write in the ops vector twice.
Pair up some ops while shuffling.
2007-02-15 21:57:09 +00:00
pooka
76fead3a3e Readlink should place the length of the link (without terminating
nul) in the length field.  Make it so.
2007-02-15 19:33:51 +00:00
pooka
a5855ee07b * slightly better dirfillers
* make readlink work
2007-02-15 18:35:16 +00:00
pooka
38efeab0aa implement proper lookup 2007-02-15 17:06:24 +00:00
pooka
99f9488df4 Implement a very very hacky fuse_get_context(), needs to be visited once
threading is added (and probably otherwise also).
2007-02-15 10:54:40 +00:00
pooka
ef61c39aea link operation does not create a new node, therefore don't do it in
the code either
2007-02-11 18:33:30 +00:00
pooka
7027ce431d hash out a bit further 2007-02-11 18:32:02 +00:00
pooka
66eeb022c2 insert comma in SEE ALSO list in fear of retaliation by wizd 2007-02-11 18:31:32 +00:00
pooka
b4a4328b14 need to compare against PUFFS_VNOVAL instead of 0 to determnine if
fields are valid
2007-02-11 18:30:55 +00:00
pooka
1bcabb4452 pass real fuse_file_info to rest of fuse ops instead of a memset-to-zero one 2007-02-11 16:06:52 +00:00
pooka
d2895ac61d sprinkle some KNF
agc ok
2007-02-11 16:02:24 +00:00
pooka
dccec0f03b fuse directory fillers return opposite truth values from puffs_nextdent,
so invert return value to make readdir callers which check the return
value work.
2007-02-11 14:38:00 +00:00
pooka
85a3d9279a Allocate refuse private data, refusenode, for all nodes. Currently it
carries fuse_file_info.

.. and lo, cddafs works
2007-02-11 12:12:39 +00:00
pooka
f3a3462b84 implement getdir, used by some older fuse file systems instead of readdir 2007-02-11 11:57:41 +00:00
pooka
8343e96869 Don't release nodes in _remove or _rmdir, implement reclaim
where to do it.
2007-02-11 10:58:43 +00:00
pooka
7d7c04f43a * sprinkle some comments to obvious XXX places
* remove outdated #ifdef from write
* return 0 if unmount is not supported instead of ENOSYS
2007-02-11 10:51:53 +00:00
agc
4cccedc203 Add an implementation of the file system in userspace functionality,
based on top of libpuffs.  This version is still barebones and
incomplete, but will benefit from others working on it, rather than
just me.

The option code has still to be implemented, but this gets far enough
to run hellofs (from the fuse web page):

	% priv ./hellofs ~/hellofs/mnt &
	% l ~/hellofs/mnt
	total 2
	drwxr-xr-x  2 root  wheel    0 Jan  1  1970 .
	drwxr-xr-x  4 agc   agc    512 Feb  9 18:05 ..
	-r--r--r--  1 root  wheel   13 Jan  1  1970 hello
	% cat ~/hellofs/mnt/hello
	Hello World!
	% df ~/hellofs/mnt
	Filesystem           1K-blocks      Used     Avail Capacity  Mounted on
	/dev/dk0              28101396  18946682   7749646    70%    /
	kernfs                       1         1         0   100%    /kern
	procfs                       4         4         0   100%    /proc
	ptyfs                        1         1         0   100%    /dev/pts
	puffs:refuse:hellofs  28101396  18946682   7749646    70%    /home/agc/hellofs/mnt
	% mount -v -v
	...
	mount: mount_puffs not found for /home/agc/hellofs/mnt
	puffs:refuse:hellofs on /home/agc/hellofs/mnt type puffs (nosuid, nodev, fsid: 0xcb01/0x6acb, reads: sync 0 async 0, writes: sync 0 async 0)
	%

This code is not enabled by default. Yet.
2007-02-11 10:31:37 +00:00