Commit Graph

4878 Commits

Author SHA1 Message Date
joerg ccdd230122 Reduce difference between recvfrom/recvmsg for netbsd32 and the native
version. This fixes the bug of lost file descriptors when the control
space is not large enough.
2012-01-13 21:02:03 +00:00
apb 0f20d9487a Instead of calling clockctl_ioctl directly, lookup the cdevsw and
call its d_ioctl function.  This should fix an undefined reference to
`clockctlioctl' when you build a kernel that has COMPAT_50 but does not
have pseudo-device clockctl.
2012-01-04 14:31:17 +00:00
apb 989df4c71f Provide a COMPAT_50 version of the CLOCKCTL_NTP_ADJTIME ioctl.
When time_t was changed from 32 to 64 bits, this ioctl's number
was changed from _IOWR('C', 0x4, struct clockctl_ntp_adjtime)
to _IOWR('C', 0x8, struct clockctl_ntp_adjtime), but the data
structure did not change, so all the compat code has to do is
change the number and try again.
2012-01-04 13:45:55 +00:00
christos 87d8a6fadb - Eliminate so_nbio and turn it into a bit SS_NBIO in so_state.
- Introduce MSG_NBIO so that we can turn non blocking i/o on a per call basis
- Use MSG_NBIO to fix the XXX: multi-threaded issues on the fifo sockets.
- Don't set SO_CANTRCVMORE, if we were interrupted (perhaps do it for all
  errors?).
2011-12-20 23:56:28 +00:00
drochner 5cc2549c59 allow kernels w/o COMPAT_50 to build 2011-12-20 16:38:06 +00:00
apb 381a814261 Add COMPAT_50 and COMPAT_NETBSD32 compatibility code for rnd(4)
ioctl commands.

Tested with "rndctl -ls" using an old 32-bit version of rndctl(8)
(built for NetBSD-5.99.56/i386) and a new 64-bit kernel
(NetBSD-5.99.59/amd64).
2011-12-19 21:53:52 +00:00
dholland 51d1d7e7c4 Rename struct ufs_quota_entry -> struct quotaval. 2011-11-25 16:55:05 +00:00
njoly 63da447932 Adjust setup_linux_rt_sigframe/setup_linux_sigframe prototypes. 2011-11-21 22:00:42 +00:00
dholland c60360c18d Reshuffle decls among the quota headers so everything is in the place
it should be:
   - stuff for the proplib interface goes in <quota/quotaprop.h>
   - stuff for userlevel only goes in <quota/quota.h>
   - stuff shared between user and kernel goes in <sys/quota.h>

Note that <quota/quota.h> and <quota/quotaprop.h> are expected to be
moved or removed later on... one thing at a time.

Update include directives in other files as needed.
2011-11-20 21:43:34 +00:00
christos fb060436c8 remove one more kassert 2011-11-18 17:36:06 +00:00
christos d356aedea4 remove incorrect assertions (the len passed is the size of the bsd structure
not the linux one)
2011-11-18 15:45:47 +00:00
martin 590ed99f9d Provide linux_siginfo_t for all archs, to unbreak kdump build. 2011-11-18 09:17:09 +00:00
christos 6f5d4fe4a7 regen 2011-11-18 04:20:16 +00:00
christos 30d1f33e42 add sigtimedwait support 2011-11-18 04:08:56 +00:00
christos f72d02ff70 - add sigtimedwait support.
- merge the siginfo population code.
2011-11-18 04:07:43 +00:00
christos 4a806ef735 add sigtimedwait 2011-11-18 04:03:50 +00:00
christos d8bca0f24f add a copyin function for sigset so that we can use sigtimedwait1 from
emulations.
2011-11-18 03:34:13 +00:00
njoly 1a2bbb9e17 Fix pipe2 return value. 2011-11-15 14:13:17 +00:00
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
hannken 2cc7a01f10 Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock.  Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.
2011-10-14 09:23:28 +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
christos 1c4884ad71 use the filesystem specific namemax not a hard-coded MAXNAMLEN 2011-09-27 00:56:14 +00:00
christos ac55ba72e3 return the namemax from the bsd statvfs which is filesystem dependent, not
a random value.
2011-09-27 00:52:55 +00:00
chs 11c35aee5c linux_termio c_cc array should be indexed by LINUX_OLD_V* rather than LINUX_V*.
fixes array overrun on alpha noticed by gcc 4.5.
2011-09-25 13:40:07 +00:00
christos 747c11eab6 Can't use RUN_ONCE here to initialize the futex_lock, otherwise we cannot
unload the module.
2011-09-14 12:28:08 +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
jmcneill 5fc89c79bc Add support for AFMT_AC3 2011-09-06 01:19:34 +00:00
njoly e6b8e35e92 Make linux_sys_getdents64 fails with ENOTDIR instead of EINVAL, when fd
does not refer to a directory.
2011-09-01 12:44:10 +00:00
plunky 7f3d4048d7 NULL does not need a cast 2011-08-31 18:31:02 +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
christos c439220508 Better debugging. 2011-08-18 02:26:38 +00:00
christos c2480dc377 sizeof type -> sizeof *var 2011-08-18 02:21:02 +00:00
jmcneill e7968ac3c4 add libcompat.o/.po targets for COMPAT_AS=obj 2011-08-11 21:23:09 +00:00
jakllsch 88e3a4403f COMPAT_16 code only exists on amd64 in the presence of COMPAT_NETBSD32. 2011-08-08 23:44:06 +00:00
njoly 598b81ec2e Fix SYSCALL_DEBUG build. 2011-07-22 10:02:08 +00:00
christos 1360a27d17 fail early on socket domain+type combinations we don't support 2011-07-17 23:59:54 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
christos 2284e7a4b7 revert accidental commit from unrelated change. no custom linux fork. 2011-07-09 23:46:32 +00:00
christos 6fd4657362 the first argument of {g,s}etitimer() is int not u_int. 2011-07-09 14:49:40 +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