Commit Graph

11893 Commits

Author SHA1 Message Date
pooka 0f53ecfb54 fold in common code for node creation. no functional change. 2007-06-25 07:52:01 +00:00
pooka c3942902c4 Since we locate in-memory nodes based on the inode number, stat a
file always after creation to cache the inode number given by the
backend file system.  Otherwise we would not find a newly created
node from incore and create another one.  In practise this was
pretty well hidden by the kernel name cache.
2007-06-24 23:02:55 +00:00
pooka 8bfc66776f document KFLAG_NOCACHE{_PAGE,_NAME,} 2007-06-24 22:32:00 +00:00
pooka 53a4105885 Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.
2007-06-24 22:25:49 +00:00
pooka 5662e7f720 PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
2007-06-24 22:18:38 +00:00
pooka 159e84cbd3 Introduce puffs_null_setops(), which initializes the ops vector with
puffs nullfs ops.
2007-06-24 18:42:25 +00:00
pooka b1da438567 * document puffs_pn_remove
* all-around improve the manual page
2007-06-24 18:16:36 +00:00
pooka 564336f084 Introduce puffs_pn_remove() to signal that a node has been deleted
and destroyed, but not yet reclaimed.  This prevents puffs_pn_nodewalk()
from returning stale entries.  Make nullfs use this (some file
systems are a bit too happy with recycling inode numbers).
2007-06-24 17:55:07 +00:00
pooka 86e63e7e27 don't return errno from a function which returns an fd - there's
a "little" room for confusion.  instead, return -1 and let the
caller grab errno.
2007-06-24 17:41:09 +00:00
christos 2f53e821af Since we are going to be looking for ports many times, use a centralized
servent data structure and pass the stayopen hint.
2007-06-23 17:32:08 +00:00
ginsbach 2f41073256 Follow the example of other nbtool compat functions, like dirname, and
don't create if it is determined that the system in question doesn't need
them.  This cleans up build warnings on systems with err.h (HAVE_ERR_H)
for example Mac OS X 10.3.
2007-06-18 14:13:54 +00:00
rmind 5fd6c5db8f - Add aio_fsync(3) manual page. Reviewed and improved by <wiz>.
- Also, fix the accident duplicate of aio_suspend(3) entry.
2007-06-17 12:47:40 +00:00
pooka 04968eb0f0 add rcs ids 2007-06-15 09:14:50 +00:00
agc 8ff3509ad4 Use pthread_[gs]etspecific to store a pointer to the fuse_context
information, enabled if MULTITHREADED_REFUSE is defined at build
time. This is not enabled by default since libpuffs is not
threadsafe yet.

librefuse is still not threadsafe, but this gets rid of a whole lot of
problems in the meantime.
2007-06-12 18:57:05 +00:00
agc 8dda7dd1f3 Minor cleanup - change uses of malloc, memset to calloc.
Use EXIT_FAILURE in preference to the less informational 1.
2007-06-12 18:54:36 +00:00
agc e19f0cc8f0 Re-work the way the SET_FUSE_CONTEXT* macros are done, following
feedback from Antti.
2007-06-12 18:53:29 +00:00
agc e9dcd39bdb # use puffs_cred_getuid(3) and puffs_cred_getgid(3)
for i in `jot 100 1`; do
	echo "I must respect the abstractions which pooka put in puffs_cred(3)"
done
2007-06-11 20:54:33 +00:00
agc 2f101ca796 Set the uid, gid and pid wherever possible (i.e. where known). This gets
us far enough along that fuse-loggedfs now works with the correct command,
uid and gid being displayed.
2007-06-11 20:10:00 +00:00
joerg 5ccf1c578a Add a new ioctl AUDIO_GETBUFINFO. It works like AUDIO_GETINFO, but
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.

This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.

Review and comments from jmcneill@
2007-06-11 13:05:46 +00:00
pooka 18e8d526ea print a specific warning if /dev/puffs cannot be opened in init 2007-06-11 06:13:34 +00:00
christos 07186f02e2 Fix tab/space confusion; from Stefan Farfeleder 2007-06-10 20:20:28 +00:00
christos cc32d5a569 Note ZFS returning the number of entries instead of the size of the directory. 2007-06-10 01:21:53 +00:00
christos 7a5ce90a9f PR/36464: scandir(3) corrupts heap when run on ZFS directories because ZFS
returns the number of entries as the directory size.
Use a new, more conservative entries estimator.
2007-06-09 23:57:25 +00:00
christos a9df04f00d bring in many changes from FreeBSD 2007-06-09 18:51:19 +00:00
wiz cd4aa9ff37 Make Nm match Dt. This makes it easier to guess what the man page is
called when you find it with man -k.
2007-06-09 10:16:25 +00:00
pooka b27fe77588 regen 2007-06-07 11:38:08 +00:00
pooka f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +00:00
christos 1418345039 Make these work with _FORTIFY_SOURCE, by overriding the fortified definitions 2007-06-03 17:39:26 +00:00
christos 5463112942 - add read and readlink since they are used internally
- protect vsnprintf and vsnprintf since for lex(1) generated files <stdio.h>
  is included before "namespace.h".
2007-06-03 17:38:07 +00:00
christos fecee97ce4 We can USE_FORT now. 2007-06-03 17:36:08 +00:00
christos aaa4c88713 provide a weak symbol for readlink since it is used internally. 2007-06-03 17:35:24 +00:00
christos d9b4f5bb0a #undef the fortified functions we use, otherwise we end up calling ourselves
recursively.
XXX: Do we need namespace.h here?
2007-06-03 17:34:35 +00:00
christos 201eeae43d this is not needed. 2007-05-31 21:46:03 +00:00
rmind 05d5495566 We should clean the ${ASM} files, not a ${PSEUDO}, which is really "pseudo" ;)
Pointed out by <veego>.
2007-05-31 05:44:14 +00:00
tls dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
tls 2368dc663d Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do.  Goodbye, libssp
dependency in libraries and executables.  Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00
veego e4f44a55a6 Fix compile errors on i386 by changing %ld to %zu. 2007-05-29 19:07:19 +00:00
tls 64e3562f4f Fix two bugs reported by Simon Burge: 1) USE_FORT and USE_SSP should be
disabled on platforms where GCC doesn't support -fstack-protector.  2) The
libssl Makefile had a hard-coded USE_FORT=yes.
2007-05-29 13:55:31 +00:00
blymn eaa84a63c0 Change debug handling, now we write debug out iff CURSES_TRACE_FILE
has been set in the environment, this prevents people using MKDEBUGLIB
getting more than they bargained for.

Tidied up the debug settings in the Makefile to reflect the above change,
we no longer need to have FULL_DEBUG since nothing is written by default.
2007-05-29 13:20:21 +00:00
blymn 070937be37 Fix some compiler warnings.
Remove shadowed variable declarations when DEBUG is defined.
2007-05-29 11:10:55 +00:00
manu d04d1dbd4b Try to make select(2) man page more insightful, by providing an example.
Based on contribution form Jean-Yves Migeon <Jean-Yves.Migeon@bde.espci.fr>
2007-05-29 07:54:17 +00:00
blymn e124de36d8 Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
2007-05-28 15:01:53 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos 2d9dad6f00 Add rl_completion_matches, fix remove_history 2007-05-27 19:45:37 +00:00
tnozaki ec36328c0e s/approprate/appropriate/ 2007-05-26 13:14:13 +00:00
christos 534e84b17b mention bcopy and bzero. 2007-05-24 20:50:28 +00:00
plunky 28aef083c5 add generic Device Controls usage page information 2007-05-24 18:05:11 +00:00
agc 9cdcc01daf After we've malloc'd an area of storage, zero out this storage, "just in
case".
2007-05-24 00:55:57 +00:00
christos 0fb2cf5330 forgot to pass the len argument; pointed out by thor. 2007-05-23 23:38:40 +00:00
tls 1f3bd3b216 memset does not have 'src' as its second argument. or, at least, in my
opinion it shouldn't.
2007-05-23 22:50:04 +00:00