tron
f8a4b15b1c
Adapt to renamed system call argument.
1999-12-04 22:15:57 +00:00
tron
f8df357a47
Add bound checks in emulation of signal(2) and return SIG_ERR on failure.
...
This fixes a part of PR kern/8904 by Dave Sainty.
1999-12-04 22:08:36 +00:00
tron
5bc798bb82
Allow signal numbers upto 63 in clone(2) emulation.
1999-12-04 21:58:05 +00:00
erh
5779957787
undo confusion.
1999-11-02 08:02:43 +00:00
mycroft
e45ef6abcd
Emulate the Linux DVD_* ioctls(2). This gets us 90% of the way to running the
...
LiViD DVD player. (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.
1999-10-29 15:02:56 +00:00
kleink
522cbf0248
Update to match new SVR4-style definition names in <sys/exec_elf.h>.
1999-10-25 13:55:06 +00:00
itohy
a833d94864
Add #include <machine/cpu.h> for need_resched() macro.
1999-10-21 23:24:08 +00:00
thorpej
09e277b357
Fix typos in the license notice.
1999-10-11 01:18:35 +00:00
tron
4d4888a7cb
After linux_sys_clone() has been moved to "linux_sched.c" we don't need
...
to include "linux_sched.h" any more.
1999-10-05 09:22:04 +00:00
fvdl
6c6e28d62b
Handle the newer, larger sigset_t Linux now uses.
1999-10-04 17:46:37 +00:00
tron
9b451861b9
Add emulation for scheduler related syscalls. Although they are dummies
...
even under Linux the posix thread library for "glibc2" requires them.
1999-10-04 16:55:54 +00:00
tron
0b48cdd9f8
NetBSD's signal number 11 is SIGSYS nog SIGSEGV.
1999-09-30 19:32:53 +00:00
jdolecek
cfa9258f85
Use DEBUG_LINUX exclusively. Fixes PR#7684.
1999-09-08 16:52:08 +00:00
thorpej
2c358fca82
Update for new msgctl()/semctl()/shmctl() calls.
1999-08-25 04:52:06 +00:00
tron
c3ea560498
Add emulation for Linux stime(2) required for MuPAD's X11 interface.
1999-08-16 19:06:29 +00:00
jtk
92bf84ec68
implement emulation of SIOCGIFHWADDR, PR 7997
1999-07-17 22:03:55 +00:00
jtk
c13299119a
add LINUX_SIOCGIFHWADDR
1999-07-17 21:46:28 +00:00
thorpej
c581bf97c5
A few things to make the Linux clone(2) emulation work a bit better:
...
- When the exit signal is specified to be 0, don't just assume they
meant SIGCHLD. In the Linux world, this appears to mean "don't deliver
an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
the exit signal to SIGCHLD if reparenting to initproc.
A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).
1999-07-15 23:18:41 +00:00
tron
c0567a6bc7
Add support for SETALL and GETALL to the Linux emulation of semctl()
...
and improve handling of SETVAL. Patches supplied by YAMAMOTO Jiro in
PR kern/7621.
1999-05-27 13:30:40 +00:00
thorpej
a2dc12021c
Oops, completely forgot to translate the exit signal in clone(2).
1999-05-17 19:26:33 +00:00
thorpej
0f74e48ca5
Emulate the Linux {get,set}resgid(2) system calls.
1999-05-14 18:45:31 +00:00
thorpej
8a61761cc5
Emulate the Linux {get,set}resuid(2) system calls.
1999-05-14 18:44:50 +00:00
thorpej
fa1c5fed1a
Emulate the Linux clone(2) system call.
1999-05-13 23:42:34 +00:00
thorpej
053ec76d86
Fully emulate the Linux wait4(2) system call, including the __WCLONE
...
flag (which is equivalent to our new WALTSIG).
1999-05-13 01:00:50 +00:00
thorpej
5512f35a12
Define the flags used by the Linux wait4() system call.
1999-05-13 00:31:57 +00:00
thorpej
e2c674e2c6
Add scheduling-related definitions. Currently we have the flags passed
...
to the __clone(2) system call.
1999-05-12 19:49:09 +00:00
thorpej
e3669c3393
Add "use counting" to file entries. When closing a file, and it's reference
...
count is 0, wait for use count to drain before finishing the close.
This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
cgd
af8a9059d3
compute the value to be used for e_arglen via howmany(value, sizeof (char *)),
...
rather than just "value / sizeof (char *)". While in these cases the latter
works as well, the former's a better example for other uses to copy (since
it handles the non-integral multiple case correctly).
1999-04-30 23:07:01 +00:00
sommerfe
280a842850
commit fix to PR7072: emulate linux non-blocking connect behavior more correctly
1999-03-25 04:26:45 +00:00
christos
c8216580df
const poisoning.
1999-02-09 20:37:19 +00:00
tron
f7f56f986f
Revert last changes:
...
Because "linux_ipccall.h" cannot be included before "sys/shm.h" and
"sys/shm.h" needs to be included after "opt_sysv.h" include "opt_sysv.h"
in "linux_ipccall.c" again.
1999-01-10 15:05:36 +00:00
erh
d9a22c586a
Undo previous: Put back opt_sysv.h
1999-01-03 05:18:01 +00:00
erh
5422cb89d9
Moved sysv opt include to header file.
1999-01-03 04:30:56 +00:00
erh
4289065a1b
Moved opt include to header file.
1999-01-03 03:54:45 +00:00
erh
41590f69e2
Grab the sysv options.
1999-01-03 03:52:22 +00:00
drochner
8b9671f0f5
get "opt_compat_xxx.h" includes out of <sys/signal.h>
1998-12-19 16:27:09 +00:00
christos
f9ac5ff367
more defensive signal conversion, and fix a malloc sizeof(int) to sizeof(int *).
1998-12-16 10:21:50 +00:00
itohy
0c080222db
Added linux compat support on m68k ports.
1998-12-15 19:31:30 +00:00
augustss
57186cce33
Slight code rearrangement and more defensive tests for the sequencer device.
1998-12-15 10:32:16 +00:00
erh
cdc6431c25
At least make this compile. Add linux compat version of auxillary data eventually to be used to make the emulation work correctly.
1998-12-08 21:00:11 +00:00
drochner
c48ea35c91
include missing SYSV option header - PR kern/6479 by Urban Boquist
1998-11-22 15:00:47 +00:00
erh
bda913305b
Make sure the interpreter string is long enough to check against.
1998-11-05 22:19:25 +00:00
christos
7d7a80a8fd
Allow kdump to compile again.
1998-10-24 19:03:53 +00:00
veego
4c127bdcd4
Include linux_errno.h to fix the recent error->errno losage.
1998-10-23 10:54:58 +00:00
erh
8b351f0104
Change linux_error to native_to_linux_errno. Add some (unrelated) debugging printfs.
1998-10-23 03:53:18 +00:00
erh
76aa1f4bcf
Moved to linux_errno.c,v
1998-10-23 03:46:25 +00:00
erh
a766015254
Moved from linux_error.c,v
1998-10-23 03:45:37 +00:00
tron
120e9f4e91
Defopt SYSVMSG, SYSVSEM and SYSVSHM.
1998-10-19 22:37:53 +00:00
erh
00a3eb89be
This is used on the alpha. It is called osf_sigaction under linux because of the format of the sigaction structure but it acts the same.
1998-10-07 23:47:44 +00:00
erh
7d45dcb522
Kill the linux_old*.h includes (which are only used in the corresponding linux_old*.c). Add linux_siginfo.h.
1998-10-07 23:11:13 +00:00
erh
1a89cf484f
Move linux_sys_mmap declarations to linux_mmap.h Make sure oldmmap.c includes oldmmap.h.
1998-10-07 23:06:17 +00:00
erh
8ce2ceae35
Fix typos.
1998-10-07 23:05:09 +00:00
erh
a956aca8aa
This needs its defines.
1998-10-07 22:58:19 +00:00
erh
47a9e7f352
Fix typos.
1998-10-07 22:50:42 +00:00
erh
baf6c8420d
Fix types. Kill old declarations.
1998-10-07 22:45:51 +00:00
erh
c7176f00e4
The siginfo include line is not needed here anymore.
1998-10-07 22:17:57 +00:00
erh
3bd73b1ef1
Add prototype for linux_sigprocmask1().
1998-10-07 22:13:39 +00:00
erh
ddbb7b3349
sigprocmask (non-rt) version doesn't exist on alpha. rename it to sigprocmask1 for use in linux_sys_sigprocmask and linux_sys_rt_sigprocmask.
1998-10-07 22:12:48 +00:00
erh
30f959e6c6
sigprocmask (non-rt version) doesn't exist on alpha. Add it here.
1998-10-07 22:11:16 +00:00
christos
9ec65653f5
unobfuscate: !strncmp() != 0 -> strncmp() == 0
1998-10-04 16:51:18 +00:00
fvdl
26c9084f20
Fix pointer fuckup that made getdents() stop working.
1998-10-04 10:17:54 +00:00
fvdl
19f71dc8ff
Fix wrong strncmp test.
1998-10-04 09:40:09 +00:00
fvdl
8096c25afc
Assign my copyright to TNF. Merge with others were appropriate.
...
Regen syscall files after script change.
1998-10-04 00:02:23 +00:00
christos
96dc2f3c56
Remove stray debugging printfs
1998-10-03 20:28:03 +00:00
christos
5f13e45116
Forgot those two.
1998-10-03 20:20:04 +00:00
christos
908291d2fe
Attempt to fix the mess.
1998-10-03 20:17:36 +00:00
perry
036f631693
shut up egcs complaints by adding braces
1998-10-01 18:58:28 +00:00
perry
4a2f07c9cd
shut up egcs complaints about braces
1998-10-01 18:57:05 +00:00
perry
5535f2a14b
Add braces to shut up egcs
1998-10-01 18:53:37 +00:00
erh
d70c9cdbc9
Wheeee!: 8-way split of compat/linux/linux_misc.c into common code and multi-architechture functions.
1998-10-01 04:05:54 +00:00
erh
c0a539a588
Define structures needed for these functions.
1998-10-01 04:00:20 +00:00
erh
46f5ff0021
Move compat/linux/linux_util.h to common.
1998-10-01 03:54:36 +00:00
erh
29217a6082
Move compat/linux/linux_sockio.h to common.
1998-10-01 03:53:00 +00:00
erh
fe99a5c47e
Add a couple function prototypes from linux_misc.c.
1998-10-01 03:49:59 +00:00
erh
b64f5d3b1a
Move IPC headers to common. The msg, sem and shm files, in addition to other common structures and to avoid creating several more machine dependent header files, include the syscall arguments for several system calls which don't exist on all architechtures.
1998-10-01 03:48:31 +00:00
erh
e6ad366c04
Moved from compat/linux/linux_dirent.h to common.
1998-10-01 03:37:51 +00:00
erh
e6a3796d67
Moved from compat/linux/linux_termios.c to common.
1998-10-01 03:36:27 +00:00
erh
658c307a1a
Move compat/linux/linux_socketcall.h to multiarch. Defines for the socketcall multiplexer.
1998-10-01 03:34:50 +00:00
erh
81cc399a4d
Split linux/compat/linux_socket.c into common and multi-architechture parts. linux_socketcall.c contains the socketcall multiplexer.
1998-10-01 03:33:17 +00:00
erh
4ab27f44f9
Move linux/compat/linux_ipccall.h to multiarch. Defines for the IPC multiplexerand associated functions.
1998-10-01 03:29:45 +00:00
erh
d4649701f2
Split compat/linux/linux_ipc.c into common and multi-architechture parts. The IPC multiplexer and associated functions are now in linux_ipccall.c
1998-10-01 03:27:38 +00:00
erh
f7ec994736
Move compat/linux/linux_ioctl.c to common.
1998-10-01 03:24:28 +00:00
erh
0060940d40
Split compat/linux/linux_file.c into common and multi-architechture parts.
1998-10-01 03:22:11 +00:00
erh
f7ac1bd375
Split compat/linux/linux_exec.c into common, elf and a.out parts.
1998-10-01 03:11:33 +00:00
erh
5b06d1ed0b
Move compat/linux/linux_error.c to common.
1998-10-01 02:32:24 +00:00
erh
a20d9dce3e
Moved compat/linux/linux_cdrom to common.
1998-10-01 02:30:36 +00:00
erh
fcaf5df8c2
Split compat/linux/linux_signal.c into i386, common and multi-architecture parts.
1998-10-01 02:27:33 +00:00
erh
2637ab656d
Move compat/linux/linux_exec.h to common.
1998-10-01 02:11:00 +00:00
erh
9c4b9e9840
Split compat/linux/linux_termios.h into i386 and common parts.
1998-10-01 01:52:58 +00:00
erh
5139d084ba
Split compat/linux/linux_ioctl.h into i386 and common parts.
1998-10-01 01:33:03 +00:00
erh
ecdc99eb5f
Split linux_types.h into i386, common and multi-architechture parts.
1998-10-01 01:31:10 +00:00
erh
79905dc1f3
Split linux_socket.h into i386 and common parts.
1998-10-01 01:19:07 +00:00
erh
45c3ba3edb
Split linux_fcntl.h into i386 and common parts.
1998-10-01 01:16:42 +00:00
erh
a3f5b4f0e7
Split compat/linux/linux_errno.h into i386 and common parts.
1998-10-01 01:03:37 +00:00
erh
a7f2aff0a7
Split compat/linux/linux_signal.h into i386 and common parts.
1998-10-01 00:57:29 +00:00
erh
b8454a0669
Split compat/linux/linux_mmap.h into i386 and common parts.
1998-10-01 00:53:44 +00:00
erh
293ccb5512
New makefiles for includes, syscall gen.
1998-10-01 00:28:33 +00:00
tv
b8aba69399
Bracket stray printf()s by #ifdef DEBUG.
1998-09-29 14:15:49 +00:00
mycroft
fb526e055c
Substantial signal handling changes:
...
* Increase the size of sigset_t to accomodate 128 signals -- adding new
versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
sys_sigpending() and sys_sigsuspend() into separate functions, and call them
from all the emulations rather than hard-coding everything. (Avoids uses
the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.
Note: Only code touched by the i386 port has been modified. Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
rvb
26b955eec7
ufs_readdir no longer checks if vp->v_type != VDIR so
...
the individual emulated readdirs must check.
Since netbsd and freebsd return EINVAL for the error
and I don't know what the other platforms do, return
EINVAL for them too.
1998-09-08 20:02:51 +00:00
christos
8fb507a3b7
Assign copyright to TNF.
1998-09-05 14:50:25 +00:00
thorpej
ff266f0937
Add some braces to make egcs happy.
1998-08-18 18:23:07 +00:00
perry
e1601dc2ca
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-09 20:36:58 +00:00
augustss
48bae9ee88
Add MIDI support. The MIDI devices can be accessed as ``raw'' through
...
the /dev/rmidiN devices, or with a sequencer interface via /dev/music.
So far the only supported MIDI device is the MPU401 port on SoundBlaster
(and only on SB on isapnp, since we do not have locators with multiple
values yet).
1998-08-07 00:00:55 +00:00
thorpej
37b70b3064
Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
...
to match the new uio_resid type.
1998-07-28 21:39:54 +00:00
thorpej
35bb79bc83
Oops, fix typo, pointed out by Urban Boquist <boquist@cs.chalmers.se>.
1998-07-07 00:40:27 +00:00
thorpej
33f066d24c
Implement the shrinking and no-change bits of the Linux mremap(2) system
...
call, provided by Urban Boquist <boquist@cs.chalmers.se> in PR #5693 .
Add a comment about how one might implement the growing bit of mremap(2).
1998-07-02 23:26:58 +00:00
mycroft
487d1fa05e
Fix typo in utime().
1998-03-24 09:47:30 +00:00
fvdl
a377495cfb
Only free cookiebuf when sure that the vop actually allocated it.
1998-03-03 13:44:48 +00:00
fvdl
e5bc90f40c
Merge with Lite2 + local changes
1998-03-01 02:20:01 +00:00
mycroft
26c238db7d
Linux's getsid(2) does in fact return a pid, not a pointer.
1998-02-20 18:09:04 +00:00
kleink
96f0dccbdd
* Use sys___posix_{chown,fchown}() instead of sys_{chown,fchown}().
...
* Change reference from sys_posix_rename() to sys___posix_rename().
1998-02-14 21:57:02 +00:00
thorpej
821a4fec46
Add a comment clearly describing that Linux's getsid(2) differs from
...
the XPG4.2 definition in that it returns the kernel virtual address
of the session structure, rather than the process group ID of the
session leader.
1998-02-14 01:28:15 +00:00
kleink
552ec236a0
Map ENOMSG.
1998-02-10 14:37:38 +00:00
mikel
4de16acd9c
update errno maps, we now have EIDRM
1998-02-06 08:26:02 +00:00
mycroft
9dd67a9098
Prototype new functions.
1998-01-24 12:39:37 +00:00
mycroft
72623d8443
Use linux_setregs().
1998-01-24 12:32:15 +00:00
mycroft
769c9d4707
Clean this up a bit.
1998-01-22 16:33:57 +00:00
christos
05d3f8a2e9
PR/4794: Urban Boquist: Linux cdrom ioctls are missing
1998-01-15 14:52:11 +00:00
perry
3c47900572
RCSID Police.
1998-01-05 17:51:27 +00:00
fvdl
af221f1c41
msync -> __msync13
1997-10-21 00:57:38 +00:00
thorpej
14cd99880c
Fix the shared library versioning snafu caused by the recent changes
...
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.
This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.
From Frank van der Linden <fvdl@NetBSD.ORG>.
1997-10-20 22:05:06 +00:00
mycroft
762d77e123
Fix bogosity in mknod(2) translation.
1997-10-19 18:35:09 +00:00
christos
79acd83ca5
check for st_nlink overflow
1997-10-16 23:54:40 +00:00
fvdl
d85f38cbec
Fix braino in my interpretation of the eof flag to VOP_READDIR.
1997-10-10 22:16:04 +00:00
mycroft
523d84775a
Emulate mremap(2) by returning ENOMEM for now. This should be sufficient for
...
realloc(3) and other uses. From Matthias Scheler in PR 3920.
1997-10-10 06:25:34 +00:00
fvdl
d6e5e295fa
Signal error when getting a 64 bit offset cookie that can't be stored
...
in 32 bits. Provide an error message to the user, and return EINVAL.
Also, pay attention to the EOF flag from VOP_READDIR. Correct a
misspell in a panic message.
1997-10-10 01:42:21 +00:00
kleink
c80051ee4e
Add missing preparation of F_GETLK parameters in linux_sys_fcntl(); fixes PR
...
port-i386/4083 from Matthias Scheler <tron@lyssa.owl.de>, but vastly cleaned
up as previously suggested by myself.
1997-09-05 01:49:12 +00:00
bouyer
1cd83a5971
Fix "missing entries" bug when reading large directories: When reading a
...
directory and running out of space in the dest buffer, off should point to the
current entry (which was not saved) and not to the next.
I discovered this bug using linux and SunOS emulation over NFS, but seems to
affect other emulations as well.
1997-08-04 09:48:07 +00:00
augustss
9745684ebe
Changes to the sudio system:
...
- It is now possible to handle devices that want "looping" DMA,
e.g. the SoundBlaster correctly. The WSS and SB drivers use this.
To do this several new methods were introduced in audio_hw_if.
- Different silence handling (forced by previous change).
- The audio driver can now be mmap()-ed, but due to problems in
the VM system only for writing for now.
- The OSS (Linux) audio emulation takes advantage of some of the
new features.
1997-07-27 01:16:32 +00:00
kleink
96588fead9
Use sys_posix_rename() instead of sys_rename() as it's the behaviour of the
...
native implementation.
1997-06-27 05:29:34 +00:00
kleink
5482ee2d93
Fixed copyin() argument botch in shmctl() IPC_STAT handling.
1997-05-08 14:33:11 +00:00
augustss
bc5c0f6530
Add Linux nice() syscall.
1997-04-07 14:13:16 +00:00
augustss
32801cf383
* Move the Linux audio emulation into its own directory and rename it
...
OSS (aka VoxWare) audio emulation.
* Use the OSS audio emulation for Linux and FreeBSD.
* Add mixer emulation to the OSS emulator.
1997-04-04 15:35:54 +00:00
mycroft
eb41ccd5fe
Emulate the SOUND_PCM_WRITE_CHANNELS ioctl. From PR 3356, by Lennart
...
Augustsson. Also add hooks for mixer ioctls.
1997-03-19 05:12:13 +00:00
fvdl
bb31faf853
Make this compile again, including Politically Correct const handling.
1996-12-22 23:00:02 +00:00
fvdl
2452eadc60
Avoid compiler warnings when none of the SYSV* options is defined.
1996-11-15 09:51:25 +00:00
christos
d551a4edf9
catch up with Jason's exec.h inclusion.
1996-10-13 18:30:05 +00:00
christos
5476886e52
printf -> kprintf, sprintf -> ksprintf
1996-10-10 17:47:29 +00:00
cgd
912e6fef44
include <sys/exec.h> rather than <machine/exec.h>
1996-10-07 21:47:33 +00:00
jtk
fb2727b7e6
update to compile; needs new enum name 'Elf_sht_progbits'
1996-10-05 00:12:49 +00:00
cgd
65148dea43
kill (re)definitions of EXEC_ELF32. They're no longer necessary
...
(because of the EXEC_* option changes), and now cause warnings.
1996-10-03 05:02:05 +00:00
thorpej
8dd444adbd
Fix a section header check that didn't get updated with the elf32/elf64
...
changes. Make this compile again with the new EXEC_* options.
1996-10-03 02:16:18 +00:00
christos
76f9ea8676
Elf32_sht_progbits -> Elf_sht_progbits
1996-09-30 23:56:01 +00:00
cgd
7c3255776d
slightly clean up some of the changes made when ELF64 support went in
1996-09-27 18:14:23 +00:00
cgd
9c3e274c7b
adapt ELF-using compat code to use new ELF definitions/code. At this point,
...
these are restricted to 32-bit ELF, and should be severely cleaned.
1996-09-26 20:52:42 +00:00
mycroft
a8fd25767d
Define execv() and execve() consistently across emulations.
...
Do path name translation.
1996-09-03 03:12:17 +00:00
mycroft
118b9b478d
sys/dir.h -> sys/dirent.h
1996-08-10 09:08:26 +00:00
mycroft
365a977533
Catch up with setre[ug]id() changes.
1996-06-23 11:13:32 +00:00
christos
d83602c110
Simplify and add comments.
1996-06-13 19:27:01 +00:00