Commit Graph

11583 Commits

Author SHA1 Message Date
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 09156a1e18 use puffs_path_walkcmp() instead of a homegrown comparison routine 2007-02-15 17:05:25 +00:00
pooka 7fea503eb4 Introduce puffs_path_walkcmp(), which is to be called from nodewalk
and compares the path of the node against the given pathobject.
Also make comparison method take a flag to indicate if it should
check if the second path is a true prefix of the first.

plus some namespace cleanup
2007-02-15 17:04:46 +00:00
yamt 4cdc2ed889 fix a race between pthread_exit and pthread_create.
inefficient, but better than crashing.
2007-02-15 15:39:33 +00:00
pooka a32e39e624 * get rid of the holy kernel-given ISDOTDOT, and instead define a
macro which does strcmp against ".." and (the untranslated)
  componentname
* make PUFFS_FLAG_BUILDPATH build paths also if dotdot is the case,
  and adapt the regular path objects to this
* make nullfs lookup readable because we can now get rid of dotdot
  processing there
2007-02-15 12:51:45 +00:00
pooka 1427bda45d generic node reclaim, which just puts a puffs_node 2007-02-15 12:51: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 b4747228a7 descend into librefuse if building with MKPUFFS 2007-02-11 18:36:26 +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
ad 743f737961 Add manual pages for new LWP syscalls. 2007-02-10 10:38:25 +00:00
ad e7cc9f60bb - Sync with reality.
- Fix date.
2007-02-10 10:34:03 +00:00
ad 4ee7030889 Add ${NETBSDSRCDIR}/sys to the include path. 2007-02-10 00:23:13 +00:00
ad 3247035dcc Cast the return value of _lwp_unpark_all(), just in case. 2007-02-09 23:53:24 +00:00
ad a0f13ff82d - Exclude SA syscalls from LintSysNormal.c.
- Obsolete SA manual pages.
2007-02-09 23:48:27 +00:00
junyoung 931a89e75c Rearrange headers for better portability. 2007-02-09 23:44:18 +00:00
ad a21c37097e Bump libpthread & libpthread_dbg minor versions so that an old SA copy
gets kept in the file system. Requested by pavel.
2007-02-09 23:00:16 +00:00
christos 233898bdaa Only try free-ing a version of res if it is not supposed to be pre-inited
like before. Fixes issues with programs passing random uninitialized data
as res_state.
2007-02-09 22:29:40 +00:00
ad 401499f30e Sync with kernel changes introduced by merging the newlock2 branch. 2007-02-09 22:08:48 +00:00
junyoung 9641e3f094 ANSIfy. 2007-02-08 05:44:18 +00:00
pooka f7a084b3b0 Nm the manual puffs instead of libpuffs 2007-02-08 05:24:36 +00:00
junyoung 19690e9aea Nuke __P. 2007-02-08 05:07:23 +00:00
oster 5422c82afe Add "local" versions of getnetgrent() et al. and now call those for the NIS
versions.  Fix conditional compilation issues with YP and NSS_FILES.
2007-02-07 19:12:44 +00:00
elad eb3ad821f0 PR/35506: Chuck Silvers: ps doesn't work on crash dumps, libkvm doesn't
know about kauth

Implemented _kvm_convertcred() to handle copying kauth_cred_t to userspace
and converting it to the appropriate 'struct eproc' members ('pcred' and
'ucred' respectively).

Okay mlelstv@.
2007-02-06 21:21:51 +00:00
ad d333bb5f2f Build without sys/sa.h present. 2007-02-06 15:24:37 +00:00
oster 0271ab9db4 nsdispatch()-ify getnetgrent() and friends.
Approved by: christos
2007-02-06 15:17:54 +00:00
pooka 6c42c843ee make it possible for the root path to be "/" and the next path to
be "/foo" instead of "//foo"
2007-02-06 01:46:41 +00:00
elad 5e2e282f9c Add support for per-user /tmp.
Enabled via per_user_tmp in /etc/rc.conf (default off).

See security(8) and rc.conf(5) for more details.

Lots of input from thorpej@ & christos@, thanks!
2007-02-04 08:19:26 +00:00
uwe 3bc8e00664 Fix previous, add forgotten pointer dereference in the call to dtoa(). 2007-02-04 03:20:22 +00:00
christos 971e3bb846 use dtoa() instead of returning empty when we don't have extended precision
information.
2007-02-04 03:05:01 +00:00
christos cb9daf8f10 cleanup:
- remove __P
	- remove unneeded casts
	- add _DIAGASSERT
	- add more diagnostics for integer overflow
	- fix size_t/int confusion
	- make debugging and statistics code compile
2007-02-03 23:46:09 +00:00
christos 72e430635f chech the correct fmt in the assertion. 2007-02-03 22:26:55 +00:00
christos c8e7c68742 int/size_t changes 2007-02-03 18:09:20 +00:00
christos 818764fc7c some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
2007-02-03 16:44:02 +00:00
christos 3ab861054c make this compile with DIAGNOSTIC 2007-02-03 16:22:48 +00:00
christos 0e61db23eb Compile with DIAGNOSTIC 2007-02-03 16:17:15 +00:00
christos b513fb7c0a make this compile with DIAGNOSTIC 2007-02-03 16:12:47 +00:00
christos d228a772b3 enable wide doubles. 2007-02-03 00:28:56 +00:00