Commit Graph

13493 Commits

Author SHA1 Message Date
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
christos
461d0372fd delete defined(sun), it could be invaded in the user namespace. Suggested
by mrg@
2009-08-31 00:05:43 +00:00
christos
5aa87ec494 use __sun || sun instead of _SunOS, from Jess Thrysoee 2009-08-30 15:41:05 +00:00
wiz
0e46e32aae Note some restrictions for getdelim arguments noted by joerg.
Bump date.
2009-08-25 16:28:26 +00:00
dsl
11bcd8ad6a The 'table' of character weights is allowed to be NULL.
The SETUP define sorts it out (in the slowest and nastiest possible way!)
Broken by rev 1.12 almost 10 years ago!
2009-08-21 20:49:50 +00:00
he
6218a6dafa Introduce a new accessor macro N_NAME() to access the n_name field
in struct nlist, since it's accessed differently depending on
whether we do a.out or not.  Use this macro as appropriate in the
nlist* functions.
Also replace some includes of <a.out.h> with <nlist.h>, to fix build
problem for mips.
2009-08-21 08:42:02 +00:00
he
f9dd8b23a6 Anoter instance of <sys/exec_aout.h> -> <sys/exec.h>. 2009-08-20 11:18:55 +00:00
martin
bc27f3e093 forward declare struct nlist before including nlist_private.h to avoid a
compiler warning.
2009-08-20 11:08:59 +00:00
he
4cf9cdf39a Actually, when we really need the a.out defines from <nlist.h>, we
need to include <a.out.h> anyway.  Move it inside #ifdef NLIST_AOUT.
2009-08-20 10:19:36 +00:00
he
3a05737d04 Instead of including <a.out.h> to get at "struct nlist" (with a comment
to explain it), include <nlist.h> instead, so that our mips ports don't
error out in the absence of aout_machdep.h.
2009-08-20 08:30:04 +00:00
joerg
8a6f35af57 Fix markup. 2009-08-19 15:43:02 +00:00
tls
3682b97c0d Oops. As Matthias pointed out, I swapped '-' for '_' in the previous
commit.  Fix that.  Also, some applications written for newer libevent
want event.h to pull in event_config.h by magic.
2009-08-19 15:18:05 +00:00
tls
cf13201bd8 Matthias Drochner pointed out that I lost the _EVENT_ prefix from all
the autoconf defines in the installed event_config.h.  Of course, the
libevent documentation basically says not to use event_config.h, so it
is a little hard to see why the right fix isn't to just not install it...
...in any event, fix this approximately as the stock libevent Makefile does.
2009-08-19 01:38:39 +00:00
christos
f227975929 Version fts one more time! This is the most versioned API ever... Bump
fts_level from short to int to avoid a potential DoS.
From Maksymilian Arciemowicz
2009-08-16 19:33:38 +00:00
matt
3308ff5cbf Only include <sys/exec_aout.h> if NLIST_AOUT is defined.
Don't define NLIST_AOUT for mips anymore.
2009-08-16 03:56:26 +00:00
enami
cc63c84008 Make nanosleep cancelable again. 2009-08-12 23:51:23 +00:00
seanb
612dfc4de9 Watch getservbyport_r() semantics. sv needs scope
while results are being looked at which in turn
are no longer valid after a endservent_r().
2009-08-12 20:24:30 +00:00
dsl
a245205b96 Change NO_SRCS lines to specify .S in order to exclude the .c file from
SRCS but add it to LSRCS (sort of makes sense!).
2009-08-11 17:30:43 +00:00
dsl
05e1772663 Change (slightly) the way NO_SRCS is processed, update big comment!
Now the .c file is removed from SRCS for both .S and .c in NO_SRSC.
The .c file is added to LSRCS for .S files in NO_SRCS.
(.S files in SRCS have the same treatment - but also get compiled.)
Allows vax build to be fixed.
Also the previous version failed to add to LSRCS correctly.
2009-08-11 17:29:04 +00:00
dsl
4ef3fc9143 Add text to the description saying that normal applications should not
use syscall().
Add text to bugs saying that high bits of the syscall number may be masked.
Fixes bug PR/11088
2009-08-07 19:34:46 +00:00
wiz
9c8f6f63d2 Bump date for previous. 2009-08-05 23:15:52 +00:00
pooka
27db690df3 fhopen() needs sys/mount.h
(if someone disagrees, feel free to fix as much as your heart desires)
2009-08-05 23:03:08 +00:00
dsl
f687cf7e68 If the current locale doesn't define the 'thousands' grouping info
then use sane defaults (',' every 3 digits).
Fixes PR/40714
2009-08-05 20:46:01 +00:00
joerg
eb96fdd9a2 ffs(3) lives in strings.h, so include the correct header. ANSIfy. 2009-08-05 16:08:00 +00:00
joerg
466a3e5dee Revert to revision 1.8. Blindly ignoring options is not acceptable
behavior and hides more problems than it is fixing.

Discussion:
http://mail-index.netbsd.org/current-users/2009/02/03/msg007761.html

Approved by: core@
2009-08-05 15:17:02 +00:00
pooka
6e1d010d65 supply proper flags to pager 2009-08-04 13:39:18 +00:00
pooka
1752ac9b33 If opening the device fails, skip etfs registration only if it is
because of ENOENT.  Otherwise, let the file system handle it.
2009-08-04 12:37:14 +00:00
wiz
835184f2b5 Formatting nits. 2009-08-03 22:13:47 +00:00
drochner
aa89e1b426 As noticed by Stathis Kamperis, the original implementation does not
always return the correct principal value (with real>=0).
(eg cacosh(ccos(1.0I)) was -1)
Replace by a more ground-up one which should do better.
2009-08-03 19:41:32 +00:00
plunky
bd42c2e8d0 Add bt_dev(3), an platform neutral API for accessing (locally configured)
Bluetooth devices, and bump libbluetooth minor version.

This is a reimplementation of an API largely developed by Maksim Yevmenkin
on FreeBSD to make it easier to port BlueZ/Linux programs which depend on
something similar. Alas, the BlueZ/Linux API is incompatible and unportable
as it depends on a 'device' being referenced by an int, but this will
hopefully make it easier to port software using that.

(bump libbluetooth minor version)
2009-08-03 15:59:41 +00:00
pooka
d90603b573 fix errno reporting 2009-08-03 15:08:37 +00:00
pooka
8bf6866a3f * use new etfs interface
+ attempt to register only if we can stat() the devpath.  this works
    around e.g. nfs devpath, which is useless to register to etfs
    XXX: the caller should decide
2009-08-03 14:24:58 +00:00
dsl
d3c3d024a7 bzero.S defines memset(), so exclude memset.c 2009-08-03 06:26:41 +00:00
dsl
af129c0bc8 bzero.S also defines memset(), so exclude memset.c 2009-08-03 06:25:34 +00:00
dsl
8190cfe5fa Don't remove imaxdiv.c 2009-07-31 20:54:35 +00:00
dsl
10ad5ffa71 Add the 'abs', 'div' and 'erand48' sources to stdlib/Makefile.inc.
Change the arch files only include the .S files.
This adds imaxdiv() to some archs where it was missing.
2009-07-31 20:39:59 +00:00
dsl
027bacee22 Use a 'register only' str[c]spn() on 64 bit systems. 2009-07-30 21:42:06 +00:00
dsl
f0a25cf095 Stop bcopy.c and bzero.c being compiled 2009-07-30 21:26:36 +00:00
dsl
0d34d14bb9 If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
2009-07-30 20:57:15 +00:00
christos
304c3bd293 fix debugging build. Hi Roy! 2009-07-28 18:38:43 +00:00
tls
3a2b6e4519 According to the libevent 1.4.12 change announcement, problems have been
observed with GCC 4 and strict-aliasing in the libevent code.  Add
-fno-strict-aliasing to work around this (same thing libevent did
upstream).
2009-07-26 21:33:46 +00:00
christos
085c78fd1f Ignore comment lines in .editrc from Jess Thrysoee 2009-07-25 21:19:23 +00:00
plunky
ca5b4d6e1f add in definitions from the latest Service Discovery Assigned Numbers
document from www.bluetooth.com
2009-07-25 17:04:51 +00:00
wiz
fa52b0ad23 Bump date for previous. 2009-07-23 13:37:34 +00:00
dholland
3cfdfcef43 Clarify the description of the errno behavior, based on the recent
thread in tech-userlevel.
2009-07-23 02:54:27 +00:00
dholland
6687b6883d Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)

Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
2009-07-23 02:31:56 +00:00
pooka
c39552c570 return proper errno from mount 2009-07-23 01:01:31 +00:00
alc
3831d4ed46 Bump date. 2009-07-22 22:54:15 +00:00
alc
2f42139c8e Constify the fourth argument of sysctlbtname(3) (ie. `newp', the pointer to
the new value).

This change sync sysctl(3) and sysctlbtname(3) prototypes.

No objection on <tech-userlevel>
2009-07-22 22:53:41 +00:00
pooka
77d8bc0d04 delint 2009-07-22 21:05:30 +00:00
pooka
d51d08a74d * catch up with the ukfs changes
* leave mounted fs reference counting totally up to le coq grande
  and simply force an unmount if the kernel has decided the mountpoint
  is not busy
2009-07-22 20:49:28 +00:00
pooka
ee47269736 Since rump rootfs now supports creating directories, mount ukfs
mounts at the requested mountpoint instead of as the rump kernel
rootfs.  While doing so, generally convert everything to use system
calls instead of handcrafter rump interfaces (e.g. rump_sys_mount()
instead of rump_mnt_mount()).  This avoids a lot of unnecessary
fuss.

Change UKFS_DEFAULTMP from / to /ukfs and bump ukfs version.
2009-07-22 20:46:34 +00:00
kleink
9be4603670 Declare strsignal(3) in <string.h>, per POSIX-2008, and adjust
documentation accordingly.

Fixes PR standards/41325 from Perry E. Metzger.
2009-07-22 19:48:27 +00:00
christos
bafe66c2cc Only need path if we have issetugid... From Anon Ymous 2009-07-22 18:25:26 +00:00