Commit Graph

12012 Commits

Author SHA1 Message Date
pooka 4fcec1c58b remember to document puffs_framev_cb error parameter addition 2007-05-16 10:07:11 +00:00
pooka c1f0cc6870 Add error parameter to puffs_framev_cb to signal if there is a
result of if the function should just do resource cleanup.
2007-05-16 10:04:08 +00:00
pooka 8be39bc354 switch the arbitrary default errno value for network i/o from
ECONNABORTED to ECONNRESET, which is at least a little bit better
2007-05-16 09:41:04 +00:00
pooka 7b30368988 update .Nd to reflect current reality better 2007-05-16 07:56:09 +00:00
agc dcd3457a33 When parsing arguments for the directory to mount, search backwards from
the end of the argument vector for an argument that doesn't begin with '-',
and use it - this improves upon the previous naive approach of using the
last argument, which could have been placed there by one of the argument
appending functions.

Be consistent with the mount name processing, and always do the
puffs:refuse:filesystem substitution once and once only.

% priv mount.ntfs-3g ntfs-refuse.img /mnt
% df /mnt
Filesystem           1K-blocks      Used     Avail Capacity  Mounted on
puffs:refuse:ntfs-3g   1000943     66309    934634     6%    /mnt
% priv umount /mnt
% priv /usr/src/share/examples/refuse/id3fs/id3fs /mnt &
% df /mnt
Filesystem         1K-blocks      Used     Avail Capacity  Mounted on
puffs:refuse:id3fs         0         0         0   100%    /mnt
% priv umount /mnt
%
2007-05-15 22:56:16 +00:00
agc 01b98414eb Fuse version 2.6 (and above) has a 4 argument version of fuse_main(),
whereas previous versions had a 3 argument one. Accept both.
2007-05-15 22:47:35 +00:00
agc a6521ab14a When puffs_mount fails, display the name of the directory which wasn't
able to be mounted.
2007-05-15 22:46:06 +00:00
skrll 795d937239 All platforms are MD_DO_NOT_NEED_FALLTHRU now so no need to keep it
conditional.
2007-05-15 16:51:37 +00:00
skrll c97173f648 MD_DO_NOT_NEED_FALLTHRU for amd64.
Thanks to Juan Romero Pardines for testing.
2007-05-15 16:48:13 +00:00
pooka 13d0372f38 memset freshly allocated puffs_usermount to 0 2007-05-15 16:45:22 +00:00
pooka 291fe845cd Step 3 and currently final step of a more general purpose event loop:
support removal and addition of i/o file descriptors on the fly.

* detect closed file descriptors
* automatically free waiters of a dead file descriptor
* give the file server the possibility to specify a callback which
  notifies of a dead file descriptor
* move loop function to be a property of the mainloop instead of
  framebuf (doesn't change effective behaviour)
* add the possibility to configure a timespec parameter which
  attempts to call the loop function periodically
* move the event loop functions from the puffs_framebuf namespace
  to puffs_framev to differential between pure memory management
  functions
2007-05-15 13:44:46 +00:00
pooka 354b8e48b8 use size_t instead of int to calm over-eager lint 2007-05-12 07:44:58 +00:00
pooka 46dc457634 copyright adjustment 2007-05-11 21:44:00 +00:00
pooka e9cad0cef9 move puffs request dispatching code into it's own module.
no functional change
2007-05-11 21:42:42 +00:00
pooka e94b19cfed Step 2 of general-purpose eventloop: get rid of puffs_framebuf_eventloop().
puffs_mainloop() now handles that functionality as well.
2007-05-11 21:27:13 +00:00
pooka 2b8177d9fc Step 1 in moving towards a general-purpose eventloop: allow the
framebuf event loop to take n i/o fd's as parameters and also allow
dynamic add/remove of fd's.  (not tested except for one fd, but more
changes coming soon)
2007-05-11 16:22:38 +00:00
christos f8178c49fa use syslog_r, from OpenBSD 2007-05-10 18:44:24 +00:00
pooka 7806d3dfc4 assert that yield/continue is done only with a real continuation 2007-05-10 12:36:44 +00:00
pooka 4966e1c1de Add some kludges to be able to execute requests on the regular program
stack instead of the continuation stack.  This is for lib/36011, where
pthread gets confused since we aren't running on the regular stack.
I'm not really sure which direction to go to with this quite yet, so
make the hack hard to enable on purpose.  The whole request dispatch
code needs cleaning anyway.
2007-05-10 12:26:28 +00:00
he e085b08462 The sl_delete function needs namespace protection added here as well. 2007-05-10 11:52:28 +00:00
pooka 4862309053 Remove the puffs_usermount argument from puffs_req_handle(). It can
be found from the other arguments and this way puffs_req_handle() is
more symmetric with the other puffs_req() routines.
2007-05-09 18:36:52 +00:00
pooka 19db57c596 List all current ways to write a file system. Also, add a reference
to puffs_req(3) for the manual operation case.
2007-05-09 18:24:11 +00:00
pooka a1388b4c53 Return 0 from puffs_mainloop() if no error occurs.
pointed out by Phil Nelson
2007-05-09 18:23:12 +00:00
christos 36a3340867 PR/36299: Greg Woods: Add namespace protection for sl_delete. 2007-05-09 17:10:29 +00:00
pooka e5a894536c document PUFFS_KFLAG_WTCACHE and PUFFS_KFLAG_IAONDEMAND 2007-05-09 13:54:08 +00:00
pooka 06dd177014 document puffs_setback() 2007-05-09 13:46:16 +00:00
pooka 7faf2bccbe Add puffs_setback(), which can be used to set setbacks for nodes before
the call returns to the kernel.  Currently it can be called only from
open(), mmap(), remove() and rmdir().  (But that might change)
2007-05-07 17:16:07 +00:00
pooka 0a36778e8f Xr puffs_framebuf 2007-05-06 13:56:16 +00:00
pooka bbf8b7cf94 document puffs_framebuf 2007-05-06 13:56:03 +00:00
pooka 4226bd8b40 implement the conveniently-already-prototyped puffs_framebuf_remaining(),
which is just shorthand for tellsize() - telloff()
2007-05-06 10:54:41 +00:00
pooka a5f3fa93dc Remove the user-specified argument for the framebuf loop callback.
It can be generated through other means if it is desired.
2007-05-06 10:21:45 +00:00
ad 9ccfa416c9 Remove pointless AUTHORS sections. 2007-05-05 19:16:01 +00:00
pooka bb0de0a878 add stubby version of puffs_framebuf manual page. proper one
forthcoming to an internet near you Real Soon Now(tm)
2007-05-05 16:09:16 +00:00
pooka b223c403fc Add puffs "frame buffers", which are an abstraction of the buffering
and event handling mechanisms required in file servers with blocking
I/O backends.  puffs_framebuf is built on the concept of puffs_cc
and uses those to multiplex execution where needed.

File systems are required to implement three methods:
  * read frame
  * write frame
  * compare if frame is a response to the given one

Memory management is provided by puffs_framebuf, but the file
systems must still, of course, interpret the protocol and do e.g.
byte order conversion.

As always, puffs_framebuf is work in progress.  Current users are
mount_psshfs and mount_9p.
2007-05-05 15:48:18 +00:00
rmind ed3e2de27c Add aio_cancel(3), aio_error(3), aio_read(3), aio_return(3), aio_suspend(3),
aio_write(3) and lio_listio(3) man-pages for asynchronous I/O.
Taken from FreeBSD with modifications for NetBSD implementation.

wizd, please! :)
2007-05-04 22:37:33 +00:00
agc 76c020111a ...and include fuse_opt.h in the correct place. 2007-05-03 21:13:25 +00:00
agc 363bf2c052 Implement fuse_setup(), and fuse_teardown() - necessary for the python
bindings for refuse.
2007-05-03 21:02:54 +00:00
agc a2b7c5e9b3 FUSE includes fuse_opt.h from fuse.h, albeit indirectly, via fuse_common.h.
Refuse doessn't have a fuse_common.h, so include fuse_opt.h explicitly
from fuse.h.  To avoid circular dependencies, don't include fuse.h
from fuse_opt.h.

This means that we no longer have to modify packages which use the argument
and option parsing routines to include fuse_opt.h.
2007-05-03 20:58:22 +00:00
ad e7c35aabc9 Remove obsolete comment. 2007-05-02 21:54:16 +00:00
pooka 80dbf44035 In case a fuse fs hands an stbuf with an inode number 0 to the
readdir filler, fake the inode number.  Our readdir() doesn't show
entries with inode number 0.

per discussion with Stephen Borrill
2007-05-02 18:05:54 +00:00
pooka f5ef068cda use PUFFS_FLAG_HASHPATH 2007-05-01 15:58:25 +00:00
pooka 5fac7361cf Introduce PUFFS_FLAG_HASHPATH, which for PUFFS_FLAG_BUILDPATH file servers
creates a hash of the node's path into po->po_hash to avoid a full pathcmp
every time.
2007-05-01 15:58:00 +00:00
dsl 7effc1a79d Set kp2p->p_ru = 0 in the kproc2 structure.
It was only ever non-zero for zombies, and now doesn't exist.
The 'pstats' field has been valid for zombies for a while (it isn't in
the uarea any more).
Fixes part of build breakage.
2007-05-01 06:58:08 +00:00
rmind 0994dd0691 - Create sysctl nodes for AIO.
- Add POSIX defined system variables and constants of AIO_LISTIO_MAX and
  AIO_MAX values.  Both with _POSIX_ASYNCHRONOUS_IO, provide them in
  sysconf(3) and getconf(1) interfaces.
- Clean up sysconf(3) for handling sysctl nodes dynamically.
2007-05-01 01:01:25 +00:00
rmind 67d703cf25 Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>
2007-04-30 14:44:28 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
tnozaki 6a1c27dd91 fix typo. 2007-04-24 15:42:08 +00:00
pooka 9601d4d304 use more accurate flag masking 2007-04-22 18:02:44 +00:00
pooka 5ad485727c assert that the file server doesn't try to return more cookies than
it was supposed to
2007-04-20 08:28:53 +00:00
pooka 89a0f35e6c improve descriptions and markup 2007-04-19 21:03:00 +00:00
pooka 5d86889ea0 add puffs_cc_getspecific(pcc), which is shorthand for:
puffs_getspecific(puffs_cc_getusermount(pcc))
2007-04-19 14:45:03 +00:00
matt ec31ca5aa4 Mark some internal libm symbols as hidden 2007-04-19 00:37:20 +00:00
pooka 7cfb5f2d40 fix readdir prototype 2007-04-18 20:37:05 +00:00
matt ae3ada32fe Make the internal __libm_dsqrt_r6 have a fake entry mask of 0 to make
ld.elf_so.
2007-04-18 04:46:13 +00:00
heinz 9e9284adba Fixed spelling error. 2007-04-17 21:11:47 +00:00
pooka d17f97ea42 * describe fhtonode, nodetofh and suspend
* update description of readdir to match reality
2007-04-17 13:11:05 +00:00
pooka eeff4f8efe Introduce PUFFS_STORE_DCOOKIE, which stores a directory cookie for a
given offset iff the directory read in question wants cookies.
2007-04-17 11:42:14 +00:00
pooka f9d2f485d4 improve markup and descriptions 2007-04-17 10:14:27 +00:00
agc 1e1fbd91da The error return code from fuse_opt_add_arg() and fuse_opt_insert_arg() is
actually -1, not 1. Fix the broken sewing machine, and make it sew.
2007-04-17 06:34:48 +00:00
xtraeme 2a9a16f24b Forgot to move the prototype in a comment to the correct place. 2007-04-17 00:25:21 +00:00
xtraeme 5ebefbd7c9 Sync comments with reality. 2007-04-17 00:23:23 +00:00
xtraeme b1f8749808 Wrap long lines. 2007-04-17 00:20:52 +00:00
pooka aaf5af07be Move file system and node callbacks into their own manual page.
Improve markup and descriptions a bit (not completely finished yet).
2007-04-16 19:16:02 +00:00
pooka 0d032531d1 document new interfaces 2007-04-16 16:37:02 +00:00
pooka d1667bb48c alloc to set flags when setting fhsize 2007-04-16 13:04:49 +00:00
agc 426de30578 Flesh out the args management a bit more:
+ put some meat into the add_arg and insert_arg functions
+ implement the free_args function
+ use 0 and 1 return values, instead of EXIT_SUCCESS and EXIT_FAILURE, in
  internal functions (they bear no relation to shell exit values)
+ deep copy argument structures in refuse.c - we need to do this because
  some FUSE file systems attempt to obliterate^Wcloak the argument vector
  "for security reasons"
+ a side benefit of this is that we get the specific refuse file system
  name back again:

[10:48:43] agc@inspiron1300 ...src/lib/librefuse 38 > df
Filesystem         1K-blocks      Used     Avail Capacity  Mounted on
/dev/dk0            28101396  19318530   7377798    72%    /
kernfs                     1         1         0   100%    /kern
procfs                     4         4         0   100%    /proc
ptyfs                      1         1         0   100%    /dev/pts
puffs:refuse:id3fs         0         0         0   100%    /mnt
[10:48:51] agc@inspiron1300 ...src/lib/librefuse 39 >
2007-04-16 09:55:51 +00:00
pooka fca427389c some routines for setting mount parameters 2007-04-16 08:28:55 +00:00
pooka 37dd7942fc Instead of keeping on adding parameters to puffs_mount(), make it
only take the bare essentials, which currently means removing
"maxreqlen" from the argument list (all current callers I'm aware
of set it as 0 anyway).  Introduce puffs_init(), which provides a
context for setting various parameters and puffs_domount(), which
can be used to mount the file system.  Keep puffs_mount() as a
shortcut for the above two for simple file systems.

Bump development ABI version to 13.  After all, it's Friday the 13th.
Watch out!  Bad things can happen on Friday the 13th. --No carrier--
2007-04-13 13:35:46 +00:00
pooka fdd8f87db5 document accessor routines added when making struct puffs_usermount
implementation private
2007-04-12 21:45:29 +00:00
ad b5a5e72af1 Mirror a fix made to the kernel's condvars:
After resuming execution, the thread must check to see if it
has been restarted as a result of pthread_cond_signal().  If it
has, but cannot take the wakeup (because of eg a pending Unix
signal or timeout) then try to ensure that another thread sees
it.  This is necessary because there may be multiple waiters,
and at least one should take the wakeup if possible.
2007-04-12 21:36:06 +00:00
pooka 95a18d20b9 Hide struct puffs_usermount from the rest of the world and provide
accessors for interesting data in it.  Namely, you can now get
pu->pu_privdata with puffs_getspecific(), pu->pu_pn_root with
puffs_set/getroot() and pu->pu_maxreqlen with puffs_getmaxreqlen().
2007-04-12 15:09:00 +00:00
pooka 65ec9d356d Don't clobber callee save registers r12 & r13 in swapcontext. They
were saved in the stack, but the subsequent swapcontext would return
to the earlier stack frame and never restore them.  Fixes puffs
with default compiler flags on amd64.

Thanks to Mihai Chelaru for providing access to an amd64 machine
for debugging this problem.
2007-04-12 12:33:26 +00:00
lukem 2d50a59010 Use IEC 60027-2 prefixes for 2^n based prefixes. 2007-04-12 06:50:39 +00:00
pooka 7ed53cb9ec adapt to new readdir signature. no functional change 2007-04-11 21:10:49 +00:00
pooka 6b7023f08f * support nodetofh and fhtonode callbacks
* use new signature of node_readdir
2007-04-11 21:04:51 +00:00
plunky a7ea3f4e89 add const to the data for hid_use_report_desc() since it does
not modify the memory.
2007-04-11 20:56:20 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
plunky 93d3f2eebc be nice, and linger to let the L2CAP connection close down gracefully 2007-04-07 21:08:46 +00:00
pooka f7d8f11391 document the flush routines 2007-04-06 17:55:10 +00:00
pooka 6cc35b910e support page cache flushing 2007-04-06 17:49:11 +00:00
pooka 1e9c4b7026 use range invalidation op also for invalidating entire page cache of a node 2007-04-06 17:06:39 +00:00
pooka 622f8591d4 document puffs_inval_pagecache_node{,_range} 2007-04-06 16:44:01 +00:00
pooka fa10fe8f9f implement puffs_inval_pagecache_node_range() 2007-04-06 16:38:03 +00:00
christos 79fa594887 Coverity CID/4454: Avoid double fclose. 2007-04-04 21:54:45 +00:00
christos 28712ce84b bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
2007-04-01 19:23:55 +00:00
tnozaki fd2dd8ec0d add new encoding support to iconv(3):
- RISCOS-LATIN1
	- DEC-MCS
	- DEC-HANYU(libDECHanyu)
2007-04-01 18:52:28 +00:00
tnozaki a224676694 oops, fix miss-increment fp->_p. 2007-04-01 18:35:53 +00:00
tnozaki 4e9a549847 mbrtowc(3) never return correct multibyte length of L'\0'. 2007-04-01 17:49:10 +00:00
tnozaki 61c3ab2f95 don't use __sgetc() to avoid overwriting fwide(3) orientation
(__srget() call by __sgetc() uses _SET_ORIENTATION macro).
2007-04-01 17:11:40 +00:00
skrll bd529f8818 MD_DO_NOT_NEED_FALLTHRU for sh5. Compile tested only. 2007-03-31 21:12:37 +00:00
ghen 1c80da3072 Re-add missing file (removed by cvs import because it was added manually by
christos).

Hi Veego!
2007-03-30 20:40:52 +00:00
ghen 225c5452c3 Resolve conflicts. 2007-03-30 20:23:03 +00:00
ghen e0bee3891d Import bind 9.4.0. 2007-03-30 20:16:18 +00:00
pooka dd4643d880 Remove check against null parameter along with the XXX comment wondering
why the check was there.  CID 4408
2007-03-29 12:54:54 +00:00
manu 7e349f87af Add support for LC_TIME, from Joachim Kuebart, through PR lib/10877 2007-03-28 19:05:47 +00:00
ad a5070151ae - Test+branch is usually cheaper than making an indirect function call,
so avoid making them.
- When parking an LWP on a condition variable, point the hint argument at
  the mutex's waiters queue. Chances are we will be awoken from that later.
2007-03-24 18:51:59 +00:00
drochner 5a0b1292cf add __BEGIN_DECLS/__END_DECLS so that this can be used from c++ libs
(there is code out there -plib/flightgear- which tries this)
2007-03-23 21:37:45 +00:00
pooka 406a946463 document credentials & access control methods 2007-03-22 17:38:09 +00:00
pooka cfd6dc233f allow kernel creds in addition to superuser creds when checking for access 2007-03-22 17:15:34 +00:00
pooka d28a42812b unify the location of *pcr in puffs_access_* 2007-03-22 16:57:27 +00:00
pooka 3a93377a23 copy ngroups * sizeof(gid_t) groups instead of just ngroups 2007-03-22 15:48:42 +00:00
pooka c3a2affb84 * return -1 and set errno instead of returning errno directly
* introduce puffs_cred_isregular() which checks if the cred structure
  has regular uid/gid (i.e. "person" credentials and not kernel creds)
2007-03-22 15:32:22 +00:00
pooka 1d029cc056 remove variable names from header 2007-03-22 14:22:08 +00:00
pooka 0f28e7c1d1 add routiens which check against ufs semantics for permission to
chown, chmod and change a/mtime
2007-03-21 19:55:55 +00:00
ad 1dd83d7758 Move PTHREADD_ADD(PTHREADD_COND_WOKEUP) back to the correct spot. 2007-03-21 19:08:18 +00:00
ad a63c21f286 PR lib/34931: PTHREAD_ATTR(3) doesn't document PTHREAD_CREATE_JOINABLE and
PTHREAD_CREATE_DETACHED macros. From Matthew Mondor.
2007-03-21 18:53:32 +00:00
christos efa6baa28d return NULL instead of core-dumping when we could not open the services file/db 2007-03-21 02:35:39 +00:00
ad d68cf1be1a - When signalling waiters, try not to awaken them immediatley. If we hold
the mutex that the waiters are using to synchronise, then transfer them
  to the mutex's waiters list so that the wakeup is deferred until release
  of the mutex. Improves the timings for CV sleep/wakeup by between 30-100%
  in tests conducted locally on a UP system. There can be a penalty for MP
  systems when only one thread is being awoken, but in practice I think it
  won't be be an issue.
- pthread_signal: search for a thread that does not have a pending wakeup.
  Threads can have a pending wakeup and still be on the waiters list if we
  clash with an earlier pthread_cond_broadcast().
2007-03-20 23:49:58 +00:00
ad b0427b61fb - Maintain a per-thread pointer to the last mutex acquired by the app, to
be used only as as a hint. Clear the pointer when releasing the mutex.
- When releasing a mutex, wake all waiters. Makes it possible to tranfer
  waiters from another object to a mutex.
2007-03-20 23:33:10 +00:00
pooka 1ba4b810d1 implement counterpart of vaccess() 2007-03-20 18:28:08 +00:00
pooka a1e98c19f2 match puffs_node_access prototype with reality 2007-03-20 18:25:56 +00:00
pooka a4143b4298 g/c unused debug variable 2007-03-20 11:28:35 +00:00
pooka 5c0f0bcf80 initial support for cacheops 2007-03-20 10:22:22 +00:00
tnozaki 037cfac899 revert to rev1.127 for iconv(3). 2007-03-19 12:27:22 +00:00
tnozaki 7ed1567506 don't use CPPPICFLAGS but CPICFLAGS.
CPPPICFLAGS obly affect *.s sources only,
but we want -D_I18N_DYNAMIC flag for *.c source
(src/lib/libc/citrus_module.c and so on).
use CPICFLAGS instead.

this fix suggested by tsutsui-san in current-users@, thanks.
2007-03-18 08:52:48 +00:00
matt bbd7ce97e9 Didn't fix it completely. Now fixed. 2007-03-16 22:50:22 +00:00
matt 0cc8f96491 Use MD_DO_NOT_NEED_FALLTHRU 2007-03-16 22:20:50 +00:00
pooka 9aca91baa1 use puffs_addvtype2mode() in puffs_fuse_node_mknod() 2007-03-16 08:17:36 +00:00
pooka 2df275c4cd va->va_mode doesn't contain the full argument to the mknod() system call,
so introduce puffs_addvtype2mode() and use that in null.c to generate the
proper syscall argument
2007-03-16 08:14:49 +00:00
pooka b93b025715 return errno instead of -1 if file is not present in lookup 2007-03-16 07:43:14 +00:00
matt e92466d560 Don't modify CSHPICFLAGS. (this causes .so file to be made when they shouldn't)
if MKPICLIB is "no", change CPPPICFLAGS otherwise add change CPPFLAGS
2007-03-15 00:59:32 +00:00
ad bfa3094e84 Cosmetic changes. 2007-03-14 23:34:48 +00:00
ad 0c61b6a65c - pthread__park: always check for cancellation.
- pthread__unpark: cosmetic changes.
2007-03-14 23:33:42 +00:00
skrll 3d370a5b33 Remove more SA libpthread stuff. 2007-03-14 21:09:01 +00:00
agc 950c7ae274 Revert the most recent changes I made - they weren't ready for primetime. 2007-03-13 22:47:03 +00:00
agc a43c9c728d Fix a thinko - if we're going to do a deep copy, let's do it properly.
With  thanks to xtraeme for the viirtual PR.
2007-03-13 22:25:32 +00:00
agc e7d3032061 + Only use EXIT_SUCCESS and EXIT_FAILURE for the return code to the
shell in the fuse_opt functions

+ add new debugging functions:
	+ __fuse_debug(), which is used to set and retrieve the
	debugging level, so that debugging information can be turned
	on and off from the user-level filesystem, and
	+ __fuse_pargs(), which prints out an argv vector

+ put the comment about pu_privdata back with the code it references

+ put the code to place the refuse name back into the fuse_new()
function - we have access to all the arguments there.

+ specifically include <fuse_opt.h> in <fuse.h> - this would seem to
be what FUSE itself does, judging by the number of fuse-based
filesystems I've patched to include <fuse_opt.h> specifically

+ do away with the forward reference to struct fuse_args in fuse.h,
since it is defined just after the forward reference without being
referenced in between

+ fill in the missing refuse_opt args functionality - add an arg to the
args structure in fuse_opt_add_arg() and fuse_opt_insert_arg(), and
free allocated memory in fuse_opt_free_args().

+ get rid of spurious forward declarations and prototypes.

+ if REFUSE_INHERIT_FS_CHARACTERISTICS is defined when refuse is built,
file systems inherit the vfs characteristics of their mountpoints. The
default value is NOT to inherit the vfs characteristics.

+ perform a deep copy of the fuse_args structure in fuse_mount() -
this is so that existing FUSE filesystems still DTRT when arguments
are zeroed out.
2007-03-13 20:50:47 +00:00
pooka ec2d43895a add puffs paper presented at AsiaBSDCon 2007 to "SEE ALSO" 2007-03-13 17:06:10 +00:00
pooka d695eff80f Create in-memory nodes only per unique inode, not unique pathname.
Solves problem with e.g. cache coherency of hardlinked files.
2007-03-13 17:05:23 +00:00
enami fab1fda977 Fix a bug that humanize_number() produces "1000" where it should be "1.0G"
or "1.0M".  The bug reported by Greg Troxel.
2007-03-13 02:52:10 +00:00
skrll f99245a3c5 Correct the struct name for PT_LWPINFO 2007-03-12 12:50:42 +00:00
christos 9a242cda5a bump major 2007-03-10 23:07:18 +00:00
christos 50873dad9c bump date 2007-03-10 18:31:42 +00:00
christos 6ccceec0a3 tyop 2007-03-10 18:31:07 +00:00
christos 33aa8ab0d0 off by one, reported by jukka salmi. 2007-03-10 18:30:45 +00:00
christos 476933786a PR/35968: Jukka Salmi: add option to pam_krb5(8) to request renewable tickets 2007-03-10 17:47:21 +00:00
christos 74d38ec395 sort. 2007-03-10 16:30:45 +00:00
skrll 0cc210063b Add in new source files.
From Henning Petersen in PR 35967.
2007-03-10 12:50:09 +00:00
hubertf 9fa07b0591 - Remove unused ctype.h header
- ANSIfy prototype

From: Slava Semushin <php-coder@altlinux.ru>
2007-03-10 01:13:14 +00:00
hubertf dafcd17c49 Remove a bunch of unneeded #include <ctype.h>s
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-10 00:12:23 +00:00
hubertf 4d49175215 Remove unneeded #include of <libgen.h>
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-09 23:44:50 +00:00
ad 3cac6dbb47 If I686_LIBC is defined, make syscalls using the 'sysenter' instruction. 2007-03-09 14:30:45 +00:00
drochner 5a8030ba23 modify the previous fix so that no pointless realloc()s are done in
the case of multiple empty continuation lines, and comment the code
to make the logics obvious
fix an unrelated comment
2007-03-08 19:57:53 +00:00
ad a99fcd719d Remove an obsolete comment. 2007-03-08 13:46:31 +00:00
mjf 0e981a1e1c - Fix man pages for openssl upgrade
- Add myself to list of maintainers for openssl
- Note the openssl upgrade in CHANGES
2007-03-07 20:43:10 +00:00
drochner 7af4323f9b -fix a condition so that fparseln() doesn't report spurious empty lines
eg after 2 comment lines, or on EOF after a single comment line
-no escape character means no escaped characters
2007-03-07 15:12:01 +00:00
tnozaki 9f260693ac disallow illegal utf-8 byte sequence and surrogate chars (RFC3629).
5-6 byte sequence(0x110000 - 0x7FFFFFFF) are still available
for backward compatibility.
2007-03-06 16:13:58 +00:00
drochner 707016f5b9 the "addr" argument to ptrace(2) is void* now 2007-03-06 16:07:22 +00:00
ad 3cf001f506 - Update to match changed pthread__park() interface.
- Simplify the locking in sem_wait().
2007-03-05 23:56:44 +00:00
ad c79299e2ec Update to match changed pthread__park() interface. 2007-03-05 23:56:17 +00:00
ad fe47a5c777 - Update to match changed pthread__park() interface.
- Fix a bug where a thread could be "reentered" onto the waiters queue.
2007-03-05 23:55:54 +00:00
ad 792cc0e17d - Simplify the interface to pthread__park() and friends slightly.
- If sysctl() fails, complain.
2007-03-05 23:55:40 +00:00
ad 8c1c910253 - Sync with reality.
- Minor cosmetic changes.
2007-03-05 23:53:53 +00:00
ad da3cc0ffcf Cosmetic and minor debugging changes. 2007-03-05 23:30:17 +00:00
ad f1c2a5c056 Undo previous, it matches IEEE 1003.1. 2007-03-05 22:25:27 +00:00
ad d6d036f667 Drop the interlock if cancelled. 2007-03-05 22:11:40 +00:00
tnozaki 1bf1d71e3c iconv: add following CCS/CES support.
- CNS11643-[3-7] <-> UCS:BMP/SIP (EUC-TW, ISO-2022-CN-EXT)
- HKSCS <-> UCS:BMP/SIP (Big5-HKSCS)
- JISX0213-[1-2] <-> UCS:BMP/SIP (EUC-JIS-2004,Shift_JIS-2004,ISO-2022-JP-2004)
2007-03-05 16:57:06 +00:00
mrg 4a3fc2cb1b fix more caddr_t -> void * fallout. 2007-03-05 03:05:16 +00:00
ad 1f1ddafc0c Add __sigsuspend14, sigtimedwait as cancellation points. 2007-03-04 20:07:13 +00:00
pooka 478abf6202 regen 2007-03-04 15:27:54 +00:00
christos 59bba4a15c Although we don't have a kqueue implementation yet, there is no point in
limiting the max fd in the poll case. Pointed out by Jan Schaumann, original
patch from FreeBSD/John Baldwin.
2007-03-02 22:56:15 +00:00
wiz 50f4650669 Bump date for previous. 2007-03-02 20:25:34 +00:00
ad 44e5b56619 Fix a sleep/wakeup race with condvars. 2007-03-02 19:56:47 +00:00
ad 67513ce0a2 Silence a gcc/lint warning. 2007-03-02 18:58:45 +00:00
ad de2138164c Remove the PTHREAD_SA option. If M:N threads is reimplemented it's
better off done with a seperate library.
2007-03-02 18:53:51 +00:00
ad dba14ef0a0 Don't grab the state lock to check for cancellation around condition
variables, as _lwp_wakeup/lwp_park provide the necessary barrier.
2007-03-02 17:47:40 +00:00
ad dc39f9ec83 pthread_detach: acquire the join lock before changing pt_flags. 2007-03-02 17:40:55 +00:00
ad 1bcb6087a6 On x86, issue the pause instruction while spinning. 2007-03-02 17:34:21 +00:00
nakayama b0cfe41e9b PR lib/34210: Avoid bus error (unaligned 64-bit access) on sparc64. 2007-03-02 13:18:55 +00:00
christos bd6c2075f1 Fix bug with multiple pending el_pushes. Reported by Julien Torres. 2007-03-01 21:41:45 +00:00
mrg 81d87b60e3 insert .WAIT between libcom_err and libasn1. 2007-03-01 02:54:51 +00:00
agc bffaa1dff1 Minor cosmetic changes to clean up some lint. 2007-02-28 21:48:46 +00:00
xtraeme 942dafa618 Add missing NetBSD RCS id. 2007-02-28 16:28:25 +00:00
xtraeme c7b91b596f * Move fuse_opt* defs and prototypes into fuse_opt.h.
* Move fuse_opt* funcs from refuse.c into refuse_opt.c.

Implement fuse_opt_parse() and fuse_opt_match(). And make the other
functions just dummy, always returning 0 (I added debugging printfs
to see what the application is trying to do).

For now there are two things that do not work in fuse_opt:

	* options accepting arguments, i.e -otimeout=%u or -ofile=%s.
	* options without arguments are not enabled, just parsed.

At least now curlftpfs works, even with verbose mode! :-)

Ok'ed by pooka.
2007-02-28 16:23:00 +00:00
agc 803c0cb0e3 For just now, just use "puffs:refuse" as the file system name - this will
be revisited when thee fuse_args parsing is revisited.
2007-02-26 22:28:11 +00:00
pooka 03c5e15dc2 Refactor a few interfaces a bit to look more like fuse. fuse_args
is implemented as a very dummy version (i.e. totally unimplemented),
so some effort is still needed there.

After this change it is possible to compile and run ntfs-3g.  It
works read/write for ntfs images and shows no faults at least with
superficial testing.  I did not test it against a block device,
only an image.

Thanks to Tracy and Jason for help with the test image.
2007-02-26 15:57:33 +00:00
pooka 819ea01282 convert FREAD/FWRITE to O_RDWR-stuff in open 2007-02-26 15:09:19 +00:00
pooka 1b5f35a8e4 Implement readdir properly, or at least as close to possible to how
fuse does it: read directory completely into refuse buffers if starting
from read offset 0 and for later calls trickle results from the buffers
to the kernel without consulting the fuse file system.
2007-02-26 13:52:16 +00:00
drochner 7fc72a801d remove references to old cabs() 2007-02-26 12:10:56 +00:00
christos 82708d0ba0 deal with the vax in a slightly disgusting way. 2007-02-26 01:29:25 +00:00
pooka a058b5a8e7 revert 1.34, as discussed with agc. It creates more problems than
it solves, namely breaks ~all fuse file systems.  Proper fix is known
but not yet implemented.
2007-02-26 00:25:40 +00:00
christos 2a84b2c2c1 Revert the kauth_impl.h change. Elad is going to maintain this. Asked by core@ 2007-02-24 20:41:33 +00:00
agc 607e07e6b1 For large directories, remove the artificial restriction on one
buffer's worth of directory entries - this work is done in the higher
level (re)fuse readdir or getdir operation.
2007-02-23 20:51:49 +00:00
christos aa221faf9e vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
2007-02-23 17:45:59 +00:00
drochner 7161d089aa -get cabs() and cabsf() out of public view - these are historical and
conflict with C99 functions which are builtins in newer gcc
 (actually, the old cabs() is ABI compatible with the new _complex one
  on i386, but this is purely accidental)
 remove public prototypes and manpages, move the code into a compat
 subdirectory as libc does so that binary compatibility is kept
-add a manpage for the isgreater() etc macros, borrowed from FreeBSD
2007-02-22 22:08:17 +00:00
ad 1296e8508f - Put detached & exiting threads on the tail of the deadqueue, not head.
- Don't forget to set PT_FLAG_DETACHED.
2007-02-21 22:31:38 +00:00
ad dacd4bd9ca Minor optimisation to previous: only check for continued existence of
the thread if it was detached.
2007-02-21 22:25:57 +00:00
pooka fedaaf62e4 * missing open is not a failure, just return 0
* nuke accidentally committed debug printf
2007-02-20 23:49:15 +00:00
pooka a44cf00bd8 reverse order of arguments to fuse->op.symlink, remove comment
suspecting argument order reversal
2007-02-20 19:13:28 +00:00
plunky faf7b91031 Add PF_BLUETOOTH to list of supported protocol families 2007-02-20 19:08:59 +00:00
pooka af95243f4c * Thread flags to VOP_OPEN (except of course O_CREAT, O_TRUNC and O_EXCL)
through fuse_file_info to the fuse open operation.
* reference count opens for each node and do release once the count
  drops to zero (instead of waiting for inactive).  I'm still not sure
  if this exactly matches linux/fuse behaviour, but at least we do
  open when a new file descriptor is opened for each node and a do
  a release when the reference to the last file descriptor for a
  node is closed, so it ought to be pretty close

cryptofs works after these changes
2007-02-20 19:00:21 +00:00
pooka 0d421bcd8b * create a refusenode also for the root node
* opendir directories in open
2007-02-20 14:51:52 +00:00
wiz 0e1939cec0 Add missing n. From jmc@openbsd. 2007-02-20 08:33:25 +00:00
pooka 838ac147aa Implement a very very stubby fuse_unmount(), which does ... nothing.
Pending some puffs changes that are in the queue, this is the best way
currently.
2007-02-19 23:12:29 +00:00
pooka bb3c90d323 fix return-in-the-middle bug in inactive. and while there, make
it always return 0, since the return value is not used for error
indication for the kernel
2007-02-19 22:12:44 +00:00
xtraeme a7ff578b00 puffs_fuse_node_inactive: initialize ret to 0 to avoid a warning. 2007-02-19 22:07:51 +00:00
pooka 6a3c4eb394 * combine emulation layer tasks for node creation to a common routine
* make set/getattr easily callable from interface functions and sprinkle
  calls to locations which require them
* use libpuffs routine for stat->vattr translation instead of homegrown one
* I have concluded that we really want to do release/releasedir in
  inactive instead of reclaim.  make it so.  we'll tweak it for the next
  file system which decides it doesn't want to work

after these changes lzofs works, at least for most parts
(I'd assume the non-working parts to fail also on fuse/linux)
2007-02-19 22:04:26 +00:00
chs ed97cebad7 switch from kqueue() back to pollts() so that signals will be unblocked
while we're sleeping.  keep the new timeout logic, though.
as discussed on source-changes some 15 months ago.
2007-02-19 18:37:14 +00:00
pooka 3780ec4943 * don't allow reads beyond at offset = EOF, all fuse file systems can't
handle it
* initialize refuse root node properly
* some misc cleanup
2007-02-18 23:30:45 +00:00
pooka 12999dc43c fix rename (yes, it's really that simple) 2007-02-18 22:42:33 +00:00
pooka 45bd3a1031 * oh, and when removing, remove the target node, not its parent directory
* use PUFFS_KFLAG_NOCACHE always for now, since code is too jumpy and
  volatile to deal with caches
2007-02-18 22:30:59 +00:00
pooka c82c131e9f * map reclaim to release, but call it only for files which were opened
* use node paths in remove/rmdir instead of pcn full paths (which are
  null for those ops)
2007-02-18 22:08:42 +00:00
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
christos 731b8a1ee4 SHA512_Last is not public anymore. 2007-02-18 18:16:24 +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 8022394bca Until someone can sort non-priviledged mounts and kauth, force
MNT_NOSUID | MNT_NODEV for mounts with geteuid() != 0.  I'm tired
of typing them on the command line every time I test a file system.
2007-02-18 17:38:10 +00:00
pooka b681c2611b dump return values for operations 2007-02-18 17:36:48 +00:00
dsl c8acc5992d Update only user code that uses the types of the e_[pu]cred members
of struct kinfo_proc.
2007-02-18 15:22:44 +00:00
wiz 216334ea2c Bump date for previous. 2007-02-18 00:46:47 +00:00
hubertf 002621f0bc Try to tell what this really does.
Including a BUGS section on why it doesn't.

*roff code by wiz@, with some input from
Slava Semushin <slava.semushin@gmail.com>
2007-02-18 00:38:22 +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
pooka 29d5922025 #include <ucontext.h> 2007-02-17 23:00:16 +00:00
mhitch d417d9f5d4 From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
2007-02-17 17:50:52 +00:00
christos 8b01459275 Define for SHA512_Last. 2007-02-17 17:18:12 +00:00
tnozaki be0ee7c9f3 citrus_csmapper.c: find_best_pivot_pvdb()
- don't break loop until all the src/dst combinations are tested.
charset.pivot.CP.src
	- redo rev 1.3.
2007-02-17 12:39:44 +00:00
wiz e7023c08af Remove pw_error prototype, the function is described in a different man page.
Bump date.

From Slava Semushin in private mail.
2007-02-17 09:37:55 +00:00
wiz c7567a33c8 Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it
2007-02-17 09:32:57 +00:00
wiz 8569abace9 o Removed functions that are in strings.h, not string.h
o Added memmem
o Bump date

From Slava Semushin in private mail.
2007-02-17 09:04:57 +00:00
wiz cf9a3d07af o Removed functions which were moved to strings.h header
o Added some missing functions from string.h
o Update SEE ALSO and STANDARDS
o Bump date.

From Slava Semushin in private mail.
2007-02-17 09:00:37 +00:00
wiz c3ab7ea8ed Remove superfluous Pp. Fix xref target. 2007-02-17 08:40:36 +00:00
wiz de27b6e4f4 Fix Dd argument. 2007-02-17 08:38:06 +00:00
freza 592d6d615c Fix MKDEBUGLIB build. 2007-02-16 16:34:17 +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 70247c3530 in case rootpath is "/", make dotdot lookup in "/foo" build
a path of "/", not ""
2007-02-15 21:26:50 +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 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