Commit Graph

623 Commits

Author SHA1 Message Date
njoly
1787cd2761 Regen for kqueue1. 2011-11-08 10:59:44 +00:00
njoly
c7617a5386 Add kqueue1(2) support. 2011-11-08 10:59:12 +00:00
dholland
f89ffda9f6 As a precaution, add sys/param.h explicitly to some headers that will
no longer get it via sys/ucred.h and don't already include it
explicitly. These should in turn be removed when it can be confirmed
that it's safe to do so. (Because sys/param.h is full of things that
are often tested with #if, it's not in general safe to remove it
without checking, as such tests fail silently if the symbol goes
missing.)
2011-10-12 23:04:22 +00:00
macallan
3d6ab01ea4 fix pasto, now SIOCS80211NWKEY and SIOCG80211NWKEY actually work 2011-10-06 03:19:32 +00:00
macallan
b788a760c4 forgot SIOCG80211NWKEY32 when adding SIOCS80211NWKEY32 2011-10-05 14:17:41 +00:00
macallan
f73964743d support WSDISPLAYIO_GCURSOR and WSDISPLAYIO_SCURSOR 2011-09-28 01:46:39 +00:00
macallan
fccabba939 support ioctl(POWER_EVENT_RECVDICT) - now powerd turns my gdium's backlight
off when the lid is closed
2011-09-07 02:35:00 +00:00
njoly
f589e415e2 Regen for dup3. 2011-08-31 16:51:05 +00:00
njoly
f1367b80df Add dup3 syscall support. 2011-08-31 16:50:32 +00:00
bouyer
ccc8030189 Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted.
For this, the bpf descriptor is flagged as compat32 (or not) in the
open and ioctl functions (where the user process's pid is also updated
in the descriptor). When the bpf buffer is filled in, the 32bits or native
header is used depending on the information stored in the descriptor.

This won't work if a 64bit binary does the open and ioctls, and then
exec a 32bit program which will do the read. But this is very
unlikely to happen in real life ...

Tested on i386 and loongson; with these changes my loongson can run
dhclient and tcpdump with a n32 userland.
2011-08-30 14:22:22 +00:00
macallan
d9554c19b2 support SIOCG80211NWKEY 2011-08-30 07:54:15 +00:00
macallan
daaec637e7 add WSDISPLAYIO_ADDSCREEN 2011-08-30 07:06:39 +00:00
bouyer
166893d482 translate WDOGIOC_GWDOGS 2011-08-27 19:25:35 +00:00
njoly
4127bcdacf Regen for pipe2. 2011-07-05 14:23:26 +00:00
njoly
f85e6e86e8 Add pipe2 syscall now needed for popen(3). 2011-07-05 14:21:46 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
dsl
57cfea60ab Delete some splurious commas and very unexpected trailing space 2011-06-05 08:42:59 +00:00
joerg
4d037bbbc9 Update from GNU extension to C99 syntax for designated initializer 2011-05-23 21:34:47 +00:00
joerg
8e5ceb1134 Use __UNCONST to get rid of const 2011-05-23 21:34:01 +00:00
rmind
8d15642306 Catch up with lim_privatise() change (missed in previous commit). 2011-05-01 02:08:15 +00:00
ahoka
7a9de7239e remove FLASH_GET_INFO compat as it is no longer using size_t 2011-04-04 18:24:56 +00:00
ahoka
3f1a2799ca flash_addr_t -> flash_off_t 2011-04-04 17:46:22 +00:00
cliff
8c2354cc52 include flashio.h 2011-03-19 13:47:43 +00:00
cliff
0d7e06e2aa compat/netbsd32 ioctl support for FLASH_GET_INFO 2011-03-19 04:07:35 +00:00
joerg
5c3ccd6eba Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code.
This enforces the constructor run order for newly linked programs.
Keep it as constructor with run-once semantic for binary compatibility.
Implement dl_iterate_phdr for statically linked programs.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-03-07 05:09:09 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
matt
91200c4c26 Don't bother the iov in netbsd32_to_msghdr since it needs to handled specially. 2011-02-20 08:07:09 +00:00
yamt
37bfe1821b netbsd32__lwp_create: add a comment and CTASSERT. 2011-02-05 13:46:44 +00:00
joerg
13011308e4 Explicitly initialize ucontext before calling getmcontext. 2011-02-03 21:45:31 +00:00
chuck
afca0358a6 udpate license clauses on my code to match the new-style BSD licenses.
verified with Mike Hibler it is ok to remove clause 3 on utah copyright,
as per UCB.
based on diff that rmind@ sent me.

no functional change with this commit.
2011-02-02 20:07:25 +00:00
matt
0f0d22769a Define 32bit version of SIOC[GS]IFADDRPREF32. We wouldn't need this to
if i386 actually aligned a uint64_t on a 64bit boundary but it doesn't.
So all that work in sockaddr_storage goes for naught.
2011-02-01 00:53:22 +00:00
matt
8e5809d382 Add the ability to mount NFS filesystems in COMPAT_NETBSD32
If in the kernel and NFS_ARGS_ONLY, just export struct nfs_args and its flags.
2011-01-22 22:26:10 +00:00
matt
fc2c6c78f2 Fix c&p error. 2011-01-22 20:51:21 +00:00
matt
ad396e28d0 Make struct disklabel 8 byte aligned. This increases its size by 4 bytes
on IPL32 platforms so add code in sys_ioctl (and netbsd32_ioctl) to deal
with the older/smaller diskabel size.  This change makes disklabel the
same for both IPL32 and LP64 platforms.
2011-01-18 19:52:23 +00:00
njoly
fd24721ce5 In stat structure conversions, do set st_birthtimespec member values
if exists.
2011-01-16 23:21:16 +00:00
pgoyette
f54a432784 Fix the build breakage, at least on amd64 2011-01-04 20:23:40 +00:00
matt
b99d2248b0 Need to deal with msg_iov in netbsd32_to_msghdr. 2011-01-04 11:00:31 +00:00
matt
701acb9073 Make the SA support as optional as is possible. 2011-01-04 10:59:28 +00:00
dholland
8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
njoly
6795d62e0d Add support for envsys(4) version 2 ioctls. 2010-09-24 13:12:53 +00:00
mrg
bb1c68152f add (runtime untested) support for AUDIO_WSEEK. 2010-09-19 10:33:31 +00:00
mrg
c97f9c82aa add support for the netbsd 5.0 versions of the VND* ioctls. 2010-09-19 09:46:59 +00:00
mrg
9e2edd2b4d support VND* ioctls. 2010-09-19 09:09:30 +00:00
drochner
690a7f09c9 -fix internal use of sigwaitinfo(2) by sigwait(3): The former returns
the signal number now, as required by POSIX. The latter should just
 return 0 on success. Fixes a mysql problem reported by Kurt Schreiner.
-document the new behavior of sigwaitinfo and sigtimedwait
-retain non-POSIX behavior for NetBSD-5 binary compatibility -- the fix
 would likely not be polled into the .0-branches, and having 5.0.x and
 5.x behave differently would be confusing. Besides that, it was
 documented in the manpage all the time.
2010-05-30 19:31:39 +00:00
joerg
9c5268bcde Fix compilation. 2010-04-23 23:05:40 +00:00
rmind
d00df28408 Replace M_IOV and some malloc(9)s with kmem(9), and while there:
- Fix invalid free (M_TEMP vs M_IOV) in do_sys_recvmsg(), spotted by jakllsch@.
  Also, same fix in osf1_sys_sendmsg_xopen().
- Fix attempt to free non-allocated memory in error path in netbsd32___getfh30().
- Plug a memory leak in compat_43_netbsd32_orecvmsg().
2010-04-23 15:19:19 +00:00
njoly
4f2ea8f3c9 Add a new clock_gettime1() function that holds most of the
clock_gettime syscall code (except for the copyout). Adjust all
corresponding syscalls to make use of it.
2010-04-08 11:51:13 +00:00
njoly
0876f873dd Move most clock_getres syscall code, except for coypout call, to a new
clock_getres1() function which can be used by emulations. Adjust all
clock_getres syscalls to now make of use it.
2010-04-03 17:20:05 +00:00
njoly
6d63d66929 Convert linux/linux32/netbsd32 clock_settime syscalls, to use the
common clock_settime1() function.
2010-03-29 15:34:07 +00:00
njoly
0f5235579c Make compat netbsd32 clock_getres copyout the netbsd32 timespec
structure, not the native one.
2010-03-29 11:39:45 +00:00