Commit Graph

4709 Commits

Author SHA1 Message Date
njoly
e05f3d58b2 Do not use 0 for pointers, but NULL. 2010-04-08 15:59:37 +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
njoly
885ee1b247 Cleanup compat netbsd32 nanosleep syscalls to use the common
nanosleep1() call instead of their own stuff.
2010-03-28 22:03:51 +00:00
pooka
934159ae4a Reset sendsig_sigcontext_vec at fini to avoid having it point at
garbage and to allow re-init of the module (if DIAGNOSTIC).
2010-03-05 16:55:56 +00:00
pooka
ec6664576e regen: ENOSYS nfssvc honestly 2010-03-03 11:08:00 +00:00
pooka
7cdfc0dfea One more overcomplex ENOSYS bites the dust. 2010-03-03 11:07:17 +00:00
pooka
cd4f4c9856 Remove nfssvc non-emulations I missed yesterday. 2010-03-03 11:02:34 +00:00
martin
5b7db4a698 Add prototype and forward declarations to make the empty nfs stub compile. 2010-03-03 10:56:47 +00:00
he
7a30544200 When implementing "read directory", when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.

This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.

Thanks to pooka@ for the hints for traversing the VOP* layer.
2010-03-03 08:20:38 +00:00
pooka
e4fb143734 regen:
- remove nfssvc / fs_nfs.h / #ifdef NFS
- make getfh unconditional
2010-03-02 21:14:43 +00:00
pooka
808ba2d476 remove nfssvc emulation (or non-emulation) 2010-03-02 21:09:21 +00:00
pooka
c20692bba4 Kill fs_nfs.h and #ifdef NFS by making getfh() support unconditional
and nfssvc unsupport unconditional.  nfs server was just a fancy
NOP anyway for all except Ultrix.  I know I'm boring but I couldn't
imagine why someone would want to run an Ultrix nfs server (and I
also doubt that it would work anymore with all the changes to fs
exporting etc).
2010-03-02 21:07:21 +00:00
pooka
cfd5efb415 regen for conditional lfs syscall removal 2010-03-02 16:09:10 +00:00
pooka
f1d702e017 -fs_lfs.h 2010-03-02 16:08:15 +00:00
pooka
1254f2d59e remove unused lfs compat stubs 2010-03-02 16:03:59 +00:00
pooka
faaaa3dedd -fs_lfs.h 2010-03-02 16:02:43 +00:00
pooka
a47bbe896e Remove lfs syscall support from compat. I can't really imagine
anyone wanting to run lfs megamaid as a e.g. FreeBSD binary.
Besides, the real action has been in fcntl() for >5 years now.
The only place where the compat syscalls might have made the tiniest
bit of sense was netbsd32, but they were unimplemented there.
2010-03-02 16:00:03 +00:00
pooka
a9b0264ca7 Nuke fs_lfs.h included for unknown reasons (if there was a reason
other than "accident", i hereby declare that reason invalid)
2010-03-02 15:46:19 +00:00
pooka
18c92f1166 fs_union.h is not used here anymore ... diudau 2010-03-02 14:23:39 +00:00
dyoung
9e575a840e Mark some suspicious ENODEV returns (should be ENXIO?) with comments. 2010-02-24 17:59:33 +00:00
dholland
62bdde038d typo in comment 2010-02-15 09:39:00 +00:00
drochner
3f900515e4 add missing glue file, otherwise the emulation will not work if
compiled into the kernel (and the module loader will load another
instance, causing symbol duplication)
2010-02-14 11:54:03 +00:00
njoly
db6e663a4c Small typo in comment. 2010-02-09 16:46:07 +00:00
wiz
cc199107ab Remove extra parenthesis. Found by cppcheck, reported by
Henning Petersen in PR 42732.
2010-02-03 13:48:53 +00:00
wiz
11b7e600cb Missing printf in sys/compat/linux/arch/powerpc/linux_machdep.c
found by cppcheck and reported by Henning Petersen in PR 42720.
2010-02-02 15:02:07 +00:00
pooka
b25b016609 A few more instances of __sigtimedwait1 -> sigtimedwait1 2010-01-19 23:15:50 +00:00
pooka
654415b2b7 Get rid of last "easy" kernel symbols starting with __:
__assert -> kern_assert
__sigtimedwait1 -> sigtimedwait1
__wdstart -> wdstart1

The rest are MD and/or shared with userspace, so they will require
a little more involvement than what is available for this quick
"ride the 5.99.24 bump" action.
2010-01-19 22:28:30 +00:00
pooka
c3183f3251 The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change
2010-01-08 11:35:07 +00:00
mbalmer
93f06d875c Remove extra semicolon. 2010-01-05 13:22:40 +00:00
njoly
5d50e994de Do not include fs_lfs.h unless _KERNEL_OPT is defined. 2009-12-21 16:18:17 +00:00
njoly
a82811a116 Remove SYS_compat_50_mq_timedreceive/SYS_compat_50_mq_timedsend
duplicate entries.

Fix a KASSERT when unloading the compat kernel module.
2009-12-21 15:13:13 +00:00
dsl
2a54322c7b If a multithreaded app closes an fd while another thread is blocked in
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567
2009-12-20 09:36:05 +00:00
mrg
97c80e8ff0 replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.
2009-12-14 04:09:38 +00:00
matt
15aa4c53c9 Regen (new makesyscalls.sh) 2009-12-14 00:53:32 +00:00
matt
e110dba586 Merge from matt-nb5-mips64 2009-12-14 00:47:10 +00:00
njoly
f6cb14208d Remove semicolon from NETBSD32TOx_UAP macro definitions. 2009-12-12 10:32:26 +00:00
njoly
9e96206789 Add missing semicolons after NETBSD32TOx_UAP macro calls. 2009-12-12 10:30:09 +00:00
njoly
c3217052b6 In netbsd32_from_{ifreq,oifreq}(), use the compat structure size for
memcpy.

From mrg.
2009-12-11 11:14:34 +00:00
njoly
5e38c900e9 Add SIOCGIFMTU support. 2009-12-10 17:07:26 +00:00
njoly
ed22c0665f Do not give native requests to netbsd32_ioctl(), use the compat
netbsd32 equivalent instead.
2009-12-10 16:55:17 +00:00
njoly
4f273f66ed Kill debug printf. 2009-12-10 15:47:23 +00:00
njoly
86051746c6 Make netbsd32_from_{ifreq,oifreq}() copy the whole structure, not only
the interface name. Finally fix my own PR/39424.

ok by christos.
2009-12-10 14:58:28 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
matt
a3e1558eec Move saemul_netbsd32 to netbsd32_sa.c and allow the KERN_SA bits to be omitted. 2009-12-10 14:10:35 +00:00
dsl
7a42c833db Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.
2009-12-09 21:32:58 +00:00
christos
67de10fc57 Add netbsd32_oifreq and fix issue in copying the interface name. With this
patch OSIOC{G,S}IFFLAGS is supposed to work, but unfortunately getifaddrs
seems to be the next problem getting the 4.99.x i386 ifconfig working on an
amd64 current machine.
2009-12-09 04:50:47 +00:00
pooka
70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00