Commit Graph

13546 Commits

Author SHA1 Message Date
tnozaki 80c3941c48 revert previous change. 2009-11-09 14:20:49 +00:00
tnozaki 5ebbcf6e82 change _RUNTYPE_SW0 bit, mklocale(1) can't treat SWIDTH0 correctly. 2009-11-09 14:17:47 +00:00
joerg f3abef9367 Improve portability and clarity by using uint8_t for the byte data
and expanding u_int to not depend on the !POSIX types.
2009-11-06 20:31:18 +00:00
pooka 44dcee46bd default to UKFS_PARTITION_NONE in argvprobe 2009-11-05 14:22:54 +00:00
dsl ef7eea8bfd Read input from the correct FILE. 2009-11-04 21:51:11 +00:00
dsl bc1d032082 Round timeout values up.
More importantly convert 1..99 to 1, not 0.
2009-11-04 21:24:57 +00:00
snj 32381fa0dd Follow upstream license changes for files with Michael Shalayeff's
copyright.  In most cases, this means dropping the 3rd and 4th clauses.
2009-11-03 05:07:25 +00:00
stacktic da8c43524c Make sure fts_statp is NULL when FTS_NOSTAT is set 2009-11-02 17:17:34 +00:00
plunky 212bd4a35c remove old libevent sources 2009-11-02 10:14:28 +00:00
plunky c75313ecdf switch build to use libevent-1.4.12-stable from external 2009-11-02 10:13:19 +00:00
dsl 905b39a994 Move calls to __restore_termios() into the failing path of the functions
that fail - instead of in most of the callers.
All rather pointless if tcsetattr() fails to set the mode we want we
are very unlikely to be able to restore any later on.
2009-11-01 22:11:27 +00:00
christos 2853bbf4b7 use %option instead of #define YY_NO_... 2009-10-29 14:49:02 +00:00
wiz bd339365ac Sort ERRORS. Add comma in enumeration. 2009-10-29 01:52:01 +00:00
njoly b83467c466 Make flock(2) more robust to invalid operation, such as
(LOCK_EX|LOCK_SH).
2009-10-28 18:24:44 +00:00
christos fb86afc52f hook the new flex. 2009-10-26 21:36:46 +00:00
jnemeth 906faa3823 mention MODULE_CLASS_SECMODEL 2009-10-26 20:43:37 +00:00
jnemeth 79487327f2 XXX - confirmed that ms_required is comma-delimited
XXX - MODULE_CLASS_ANY shouldn't be returned, but potentially could
      be if a module were declared that way
2009-10-26 20:40:00 +00:00
dholland f1c1c5ddec Edit - expand descriptions; document data structures in English rather
than in C; use more markup; make nroff output not exceed 80 columns.
2009-10-26 05:57:36 +00:00
christos 4958d088d0 back to old lex 2009-10-26 04:08:25 +00:00
christos d4aeae3f68 hook the new flex library 2009-10-26 01:18:46 +00:00
christos cfbb35ed03 revert some of dsl's changes to make things build on i386; he can undo what
he wants when he comes back.
2009-10-25 20:44:13 +00:00
dsl 5f1a9bea9e Lint is differentially far too picky...
Remove some warnings that only appear on i386 (not on amd64) and that
for some reason best known to others are deemed fatal for i386.
Making this code 'pass lint' does absolutely nothing for its readability (etc).
2009-10-25 17:09:34 +00:00
mlelstv 7aea3a0d0a import tzcode2009k 2009-10-25 16:20:16 +00:00
christos 3b0d9a876a don't read hostaliases using unbuffered reads. there is no security benefit. 2009-10-24 21:37:57 +00:00
christos 9d8aeaab57 simplify the example; only register the set of events to watch once since
it does not change. Also print that ATTR means changing times too.
2009-10-24 17:49:58 +00:00
christos e942b6ecb2 expose res_check. 2009-10-24 17:24:01 +00:00
mlelstv df0cec4903 With 64bit time_t years can be negative and lapyear computation
requires rounding down. This avoids an infinite loop in localtime().
2009-10-24 17:01:04 +00:00
dsl 0b807be843 Remove a load of pointless casts - one that even lint doesn't bleat about. 2009-10-24 15:20:15 +00:00
dsl 695bc79994 Check for EOF before erroring fgets() with length <= 0.
If length is invalid, set errno = EINVAL and __SERR as well returning NULL.
Should let me close PR/41992.
2009-10-24 14:50:48 +00:00
reed 192dabfaf3 Add missing comma in the NAME Nm list. 2009-10-24 11:17:13 +00:00
christos 249296c41c Add a knote to keep track when resolv.conf gets changed and re-initialize.
While here fix a memory leak when calling res_vinit with an already inited
res_state.
2009-10-24 05:35:37 +00:00
joerg d3ac1c4282 Disable the use of mandoc for now until support for conditional
expression exists.
2009-10-23 23:42:52 +00:00
cegger 6e975d4155 fix typo: rag -> reg 2009-10-23 15:41:58 +00:00
tsarna 8c31ceec62 Update my email address to one I have used in this millenium. 2009-10-22 23:08:03 +00:00
bouyer e0f9b22254 Remove closes 3 and 4 from my copyright. 2009-10-22 21:50:01 +00:00
snj 799a191e36 Pull in revisions 1.24 and 1.25 from upstream, which change this file's
license to ISC-style.
2009-10-22 01:38:18 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
skrll 43f47d3c56 G/C bcopy.m4 and references to it. 2009-10-21 19:30:46 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
snj 4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00
jnemeth 1cadc32cd7 First pass at a manpage for modctl(2) (hi ad!). 2009-10-20 04:41:28 +00:00
joerg be403b3398 Fix header to include. From Kristaps Dzonsons. 2009-10-19 22:38:56 +00:00
christos 236714187a PR/42201: NAKAJIMA Yoshihiro: fts(3): broken compatibility
As new field types were added, we did not provide overrides for older compat
versions. This restores compatibility.
2009-10-19 17:52:01 +00:00
pooka a37ccec12c Default "recycle" to false in inactive. File system drivers do
not always set it.
2009-10-19 17:34:07 +00:00
pooka d33c69eb5f bump minor for puffs_setmntinfo() 2009-10-18 20:26:33 +00:00
pooka f0d8515717 include some headers we use 2009-10-18 20:14:06 +00:00
pooka 38a8ac9c61 Split init routines a bit more to allow for p2k init without having
to pass any real configuration data.  This benefits things like
rump_smbfs which need to init rump before running the userspace
mount routines (because they make rump system calls) but cannot
run p2k_setup() at that stage because it requires data provided by
the userspace mount routines.  And p2k_setup() in turn forks (to
detach), so it cannot be run after rump has been inited and threads
have been created.
2009-10-18 19:36:41 +00:00
pooka 0f699dcf1d Make it possible to supply parameters to puffs_init() later (but
before puffs_mount()).
2009-10-18 19:09:20 +00:00
pooka dd0a0505f1 Implement abortop. 2009-10-17 23:20:15 +00:00
pooka 75008bfc31 Dispatch puffs_node_abortop().
Note: We use the storage of puffs_cache_write from puffs_ops for
this purpose.  It's not issued by the kernel and hence currently
unused, and this saves us from the trouble of bumping the lib major
version.
2009-10-17 23:19:52 +00:00
pooka eea7b3ade4 Add some comments on how to act when major is bumped the next time. 2009-10-17 21:36:02 +00:00
pooka 2ce66cd910 use newstyle rump lwp interfaces 2009-10-15 16:41:08 +00:00
dsl 40f437887d Reverse previous, committed by mistake. 2009-10-15 06:19:35 +00:00
roy 5f96926957 Handle errors from getdelim better. 2009-10-15 00:36:24 +00:00
dsl 01a0f8ea84 Change a while () {} into a do {} while() so that fgets(buf, 1, file)
detects EOF on an empty file.
Fixes most of PR/41992
2009-10-14 21:25:52 +00:00
roy 6e80fcc98f Store the allocated buffer against FILE, plugging a memory leak.
Fixes PR bin/42183.
2009-10-14 20:54:51 +00:00
pooka bf3992af18 Adjust names of external rump control interfaces to match the
new rump_pub namespace.
2009-10-14 18:22:50 +00:00
joerg 178d0fc825 Do not nest displays, use lists instead. Discussed with wiz.
Fix markup.
2009-10-14 17:24:03 +00:00
pooka 363b14551a In a furious blaze of *facepalm* / "what was i thinking?", fix the
open routine function pointer prototype of opendisk1() to match
the prototype of open().
2009-10-13 22:00:31 +00:00
joerg 6fc39b6fcb No .Pp inside .Rs/.Re. 2009-10-13 21:39:55 +00:00
pooka e0ace4590b Expand rump curlwp macro. 2009-10-13 20:06:38 +00:00
bad 6947118ad3 Implement prop_array_externalize_to_pref(), prop_array_copyin(),
prop_dictionary_externalize_to_pref() and prop_dictionary_copyin()
as discussed in the thread:
http://mail-index.netbsd.org/tech-kern/2009/07/29/msg005594.html

Bump libprop shlib minor.
2009-10-10 18:06:53 +00:00
pooka 476b5ba667 Expose a separate mount and run interface for those servers which
want to perform actions after mounting.
2009-10-09 16:37:30 +00:00
pooka 50efcfca57 When converting the locking path of mutex+counter to a real recursive
mutex, it's a good idea to convert the unlock path too so that the
recursive mutex gets released as many times as it was locked.
Fixes pthread + cxa deadlock.
2009-10-08 16:33:45 +00:00
pooka a06931db70 puffs might call getattr after we decided to recycle node. protect. 2009-10-07 20:56:29 +00:00
pooka 0605ce2bd4 Provide p2k_run_diskfs(), which acts like p2k_run_fs(), but taps
into ukfs_mount_disk() instead of ukfs_mount()
2009-10-07 20:55:25 +00:00
pooka a230afc74e fix warning whine 2009-10-07 20:53:38 +00:00
pooka ae7625c02d Add what is essentially disklabel support. All disk-based file
systems should be mounted with ukfs_mount_disk() from now on.  The
partition argument specifies which label is being mounted (or the
entire image).  E.g. partition 4 should be label 'e'.
2009-10-07 20:51:00 +00:00
jdc 7ffe6d60fa Return the same information whether or not we have wide characters.
Problem pointed out by Rhialto on current-users.
2009-10-06 20:03:27 +00:00
pooka b02819edcd don't double free p2m 2009-10-06 16:57:54 +00:00
pooka 5290e6c820 Give a p2k node an internal state. This allows us to do proper
reference counting and not release nodes based just on puffs'
impression of if they are free.

This also allows us to reclaim vnodes already in inactive if the
file system so desires.  Some file systems, most notably ffs, change
file state already in inactive.  This could lead to a deadlock in
the middle of inactive and reclaim if some other puffs operation
was processed in between (as exposed by haad's open(at) test
program).

Also, properly thread the componentname from lookup to the actual
vnode operation.  This required the changes the rump componentname
routines.  Yes, the rename case is truly mindbogglingly disgusting.
Puke for yourself.
2009-10-06 16:23:03 +00:00
rmind 63a834705c pthread_attr(3): sync with reality i.e. uncomment descriptions about
various functions we support.  Fix license style.
2009-10-05 23:37:01 +00:00
rmind 26ce5a50b4 pthread(3): mention that we use 1:1 threading model; remove descriptions
of no longer used environment variables.
2009-10-05 23:35:42 +00:00
rmind 81bc3e51a5 Add check to avoid multiple inclusions and redefinitions.
KNF while here.
2009-10-05 23:33:48 +00:00
wiz 00f6672d21 Mention NetBSD in HISTORY as well. 2009-10-04 22:11:22 +00:00
christos 26573d8819 add f{min,max,dim}{,l,f} from FreeBSD 2009-10-04 22:04:30 +00:00
tnozaki 6c81c0d804 fix lib/42124: setlocale(3) never returns NULL with none existing locale.
reported by kambe-san, thanks!
2009-10-04 21:05:18 +00:00
christos 85ddadbfdc Don't just look only at the first element in the deadqueue to find lwp's
to reuse, because if we lose the race with the kernel we are never going
to reuse any elements. Look in the whole list instead.
XXX: should be pulled up to 5.x
2009-10-03 23:49:50 +00:00
phx c9394f466a SystemV-R4 ABI for M68k returns pointers in %a0, so we have to make sure
that CERROR returns -1 in %a0 in addition to %d0 and %d1, to make functions
like mmap(2), mremap(2), shmat(2) or sbrk(2) return -1 in case of an error.
A side effect of this bug was a segfault caused by jemalloc, when mmap()
failed.
2009-10-03 22:28:33 +00:00
pooka 323d1b6573 * allow callers to store a private data pointer behind the ukfs handle
* release reference on root vnode before unmounting
  (and reaquire the root vnode if unmount fails)
* return correct error value if unmount fails
2009-10-02 09:32:01 +00:00
wiz 3dee657aa5 Revert a -> an changes: Adding an 'n' follows pronunciation, not writing. 2009-10-02 07:41:08 +00:00
wiz b9f34d69ea Bump date for new allocaddrinfo. 2009-10-02 06:59:37 +00:00
cegger 45db136e91 fix grammar: a -> an 2009-10-02 06:49:23 +00:00
tsarna 1f4f234ea9 Introduce allocaddrinfo(3) to make writing getaddrinfo() nss plugins easier.
Discussed on tech-net.
2009-10-02 02:45:28 +00:00
pooka e99ca06d65 Give rump_sys_unmount() in ukfs_release() a curlwp context. This
prevents use-after-free and should fix crashy cases reported by
Arnaud Ysmal.
2009-09-29 11:17:00 +00:00
elad 6780ec6543 CTLFLAG_READONLY[12] are long gone. 2009-09-26 04:43:48 +00:00
pooka 4c1e54d82b Add Solarisa-like dlinfo() interface to the ELF dynamic linker.
Implement RTLD_DI_LINKMAP which returns a pointer to the linkmap
chain at the given object.  Other Solaris queries are currently
unimplemented.
2009-09-24 21:21:33 +00:00
roy 86eafd3e05 __getdelim works on strings up to SIZE_MAX - 2 and returns 0 on EOF.
getdelim works on strings up to SSIZE_MAX and returns -1 on EOF.
__fgetstr is now just a wrapper around __getdelim and ensures that
the buffer doesn't overflow the one provided by FILE.
__slbexpand is now static in fgetwln as it is the only consumer of that func.
2009-09-24 20:38:53 +00:00
pooka 70d95ce59f fix markup 2009-09-14 20:54:34 +00:00
apb 50a2fd2471 Make the documentation match reality. If no explicit kernel name is
provided, kvm_open() and kvm_openfiles() will try _PATH_KSYMS first,
then either the path from sysctl machdep.booted_kernel (if that's
available) or _PATH_UNIX (if the sysctl is not available).
2009-09-14 19:34:12 +00:00
apb 8a61809cf3 Move the code that tries to open _PATH_KSYMS first into a common path,
so that it is used both for the /dev/mem case and the core dump case.

Output from savecore(8) before:
    savecore - - - (null): kvm_openfiles: /netbsd: No such file or directory
and after:
    savecore - - - no core dump
2009-09-14 19:29:20 +00:00
pooka aaaf93f1d4 Add opendisk1(), which functions like opendisk(), but takes a function
pointer to the routine to be used for open().
2009-09-08 21:34:57 +00:00
christos ea3813ed2f apply apple patches from:
http://opensource.apple.com/source/libedit/libedit-11/patches/
2009-09-07 21:24:33 +00:00
dsl 602976fff6 Ansify functions and remove __P/ 2009-09-05 08:53:06 +00:00
dholland 9af4cd75f3 Add parentheses around a misleading string constant concatenation,
from (my own, very old) PR 36064.
2009-09-05 06:44:27 +00:00
apb a9dda51fb1 Add cross references to new boothowto(9) man page. 2009-09-04 23:29:02 +00:00
pooka de4fa6c51a Build & install rumpdev, a device component for rump. It currently
supports autoconf and is required for example by pseudo-device rump
components.
2009-09-03 15:35:58 +00:00
pooka fd46b5b66c install librumpcrypto component: kernel crypto routines 2009-09-03 12:33:54 +00:00
wiz 9e5519cfe8 Make HTML-ready. 2009-09-01 22:12:05 +00:00
elad 8fbf70d4eb Add useful example program from
http://mail-index.netbsd.org/tech-kern/2009/09/01/msg006020.html
2009-09-01 22:01:48 +00:00