summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Moved include files which are independent of bs driver.kato1997-08-281-0/+64
|
* Ops the arguments to copyin was in the wrong order..sos1997-08-101-2/+2
| | | | This has survived since the first version, sigh.
* Removed unused #includes.bde1997-07-205-22/+5
|
* Make this thing actually compile.dfr1997-06-021-2/+2
|
* Oops, remove some bogus debugging code that crept in with the last commit.msmith1997-06-021-10/+1
|
* Add support for the SIOCGIFHWADDR ioctl, commonly used bymsmith1997-06-021-1/+44
| | | | | | | | | license managers to obtain the host's ethernet address as a key. Note that this implementation takes the first hardware address for the first ethernet interface found, and disregards the interface name that may be passed in, as linux ethernet devices are all "ethX".
* Always include PROT_READ for Linux mmap operations.msmith1997-04-281-2/+2
| | | | Submitted by: Hannu Savolainen <hannu@voxware.pp.fi> via jkh
* Remove dependancy on UFS' DIRBLKSIZ definition.dfr1997-04-061-6/+2
| | | | | | 2.2 candidate. Submitted by: bde
* Fix linux_getdents so that it can cope with filesystems which translatedfr1997-04-051-10/+46
| | | | | | | | the directory format (ext2fs, cd9660). For these filesystems, it must use cookies to find the correct offset to use for subsequent reads. Without it, linux /bin/ls tends to loop re-reading the same block over and over again. 2.2 candidate.
* Removed potentially harmful garbage <vm/lock.h> and fixed bogusbde1997-04-011-2/+1
| | | | | | use of it. It was actually harmless because the use was null due to fortuitous include orders and identical (wrong) idempotency macros.
* Don't include <sys/ioctl.h> in the kernel. Stage 3: includebde1997-03-241-3/+2
| | | | <sys/filio.h> instead of <sys/ioctl.h> in non-network non-tty files.
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-243-6/+3
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-232-3/+4
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-229-9/+9
| | | | ready for it yet.
* Make this compile again after the Lite2 merge.mpp1997-02-102-5/+4
| | | | | | VOP_UNLOCK was being called with the wrong mumber of arguments. Also silenced a -Wall warning.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-102-4/+4
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-149-9/+9
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fixed lseek() on named pipes. It always succeeded but should always fail.bde1996-12-191-1/+2
| | | | | | | | | | Broke locking on named pipes in the same way as locking on non-vnodes (wrong errno). This will be fixed later. The fix involves negative logic. Named pipes are now distinguished from other types of files with vnodes, and there is additional code to handle vnodes and named pipes in the same way only where that makes sense (not for lseek, locking or TIOCSCTTY).
* Add IP_OPTIONS and the multicast-related setsockopts to thefenner1996-12-031-1/+14
| | | | | | | | | | | list of IP setsockopts the Linux emulator recognizes. Explicitly disallow IP_HDRINCL since Linux's handling of raw output is different than BSD's. Closes PR#kern/2111. Submitted by: y-nakaga@ccs.mt.nec.co.jp (Yoshihisa NAKAGAWA)
* Add audio mixer ioctls.smpatel1996-11-051-1/+73
| | | | Only writing to the mixer is implemented.
* Changed type of ni_dirp in `struct namei' from caddr_t to `const char *'bde1996-09-031-4/+3
| | | | | | | so that the compiler can see that it is OK to use const strings in NDINIT(). Some emulators want to use paths of the form "/compat/foo". Removed the casts that hid the non-problem. Didn't fix the missing consts in syscalls.master that hid the non-problem.
* Fix memory leak bug in the path parsing code which never released it'snate1996-08-051-6/+10
| | | | | | | | | buffer in certain error conditions. Sync up the code to that in NetBSD where applicable. Reviewed by: Gary Jennejohn <garyj@munich.netsurf.de> Submitted by: Michael Smith <msmith@atrad.adelaide.edu.au> Obtained from: NetBSD sources
* Removed unused #include. Linux doesn't support SCO consoles.bde1996-06-231-2/+1
|
* Clean up -Wunused warnings.gpalmer1996-06-123-10/+6
| | | | Reviewed by: bde
* First pass at cleaning up macros relating to pages, clusters and all that.phk1996-05-021-3/+3
|
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-4/+1
| | | | copied from bad examples.
* Fixed unsigned longs that should have been vm_offset_t.bde1996-03-191-3/+5
| | | | | | | | | | vm_offset_t is currently unsigned long but should probably be plain unsigned for i386's to match the choice of minimal types to represent for fixed-width types in Lite2. Anyway, it shouldn't be assumed to be unsigned long. I only fixed the type mismatches that were detected when I changed vm_offset_t to unsigned. Only pointer type mismatches were detected.
* Remove references to MAP_FILE.. That is now "default" and is onlypeter1996-03-121-2/+2
| | | | a "#define MAP_FILE 0" that is still there for net-2 source compatability.
* Fix the vm_map_remove and vm_map_protect calls.. Somewhere along thepeter1996-03-101-3/+3
| | | | | | line, these had got (start, length) arguments instead of (start, end) args. This could be the cause of Robert Sanders lockups with ZMAGIC binaries.
* Implement rudumentry support for the linux TIOC[SG]ETSERIAL ioctl's.peter1996-03-101-1/+62
| | | | | | | | To complete this, some extra state has to be kept somewhere so that the B38400 flag in Linux can be correctly translated to/from either 38400, 57600 or 115200. Submitted by: Robert Sanders <rsanders@mindspring.com>
* Fix the getdents() emulation, the Linux ELF libraries use this, andpeter1996-03-101-3/+11
| | | | | | | this code was not quite right (linux has a readdir and getdents syscall, with the same args. readdir only returns one entry and uses a mutant dirent structure. This code was also returning the mutant form for getdents as well. My fault for missing this before.)
* Fix a (mostly harmless) bogon when allocating space above the stackpeter1996-03-101-2/+2
| | | | in the stack gap..
* First attempt at FreeBSD & Linux ELF support.sos1996-03-101-3/+1
| | | | | | | | | | | | | | | | | Compile and link a new kernel, that will give native ELF support, and provide the hooks for other ELF interpreters as well. To make native ELF binaries use John Polstras elf-kit-1.0.1.. For the time being also use his ld-elf.so.1 and put it in /usr/libexec. The Linux emulator has been enhanced to also run ELF binaries, it is however in its very first incarnation. Just get some Linux ELF libs (Slackware-3.0) and put them in the prober place (/compat/linux/...). I've ben able to run all the Slackware-3.0 binaries I've tried so far. (No it won't run quake yet :)
* update linux_times() and linux_utime() emulation,peter1996-03-042-17/+49
| | | | | fix sigsuspend() (actually back out my recent change there) and regen the syscall tables..
* Add support for LINUX_TCSETAW and LINUX_TCSETAF, which Linux-pine uses.peter1996-03-041-1/+9
| | | | Submitted by: Robert Sanders <rsanders@mindspring.com>
* Add support for the old-style Linux termio (not termios) TCGETA etc.peter1996-03-031-2/+72
| | | | | | | | | Also, LINUX_POSIX_VDISABLE is \0, FreeBSD's is 0xff. Convert between them. This enables some more programs to run, including the Livingston Portmaster utilities (PMtools). Submitted by: Robert Sanders <rsanders@mindspring.com>
* Minor touch-up... make two functions static, and add missing $Id$peter1996-03-021-3/+3
|
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-029-380/+1202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* This is an extract of changes from what I am currently running...peter1996-02-161-64/+151
| | | | | | | | | | | | | | | | | | | | | | | - Optimise the linux a.out loading and uselib system calls so they take advantage of some of John's recent interface improvements. Basically, this means they make far less map changes than before. - Attempt to plug some potentially nasty kernel_map memory leaks.. - Improve support for QMAGIC libs (I only use QMAGIC (ie: a.out libraries from the slackware 3.0 dist) but this depends on other changes to enhance the /compat/linux support) - uselib goes out through a single exit as part of the resource tracking that I did when closing the resource leaks on errors. This could be cleaner than what I did, but making a 30-deep nested if/else was not my idea of fun, neither did I want to repeat the same code 30 times over for each failure possibility. I guess this function needs to be split into smaller functions to solve this. I've been running the Linux Netscape-2.0 (with Java) to test this, and apart from the long-standing problem with the missing scrollbars, it appears to still work as before with ZMAGIC libs (and the leaks).. However, I've been using it with mods for the signal trampoline code for native linux stack frames on signals and exterminated the blasted sigreturn printf() problem, so I can't be certain that there is not a dependency on something else.
* Call pipe_stat() when presented with a DTYPE_PIPE file in the linuxpeter1996-01-301-1/+5
| | | | | | | fstat() syscall, rather than panic("linux newfstat"). (Note: I've extracted this from a larger set of diffs, I'm confident I've not missed any dependencies but can't modload it to test it on my system)
* Fixed vm_map_find for new vm updates.dyson1996-01-191-4/+7
|
* Add linux_mknod so that it will do mkfifo if needed...sos1996-01-141-1/+16
|
* reran makesyscallspeter1996-01-081-2/+1
| | | | | Always call the SYSV ipc functions, stubs will take their place if necessary.
* The Linux emulator depends on SYSV IPC but doesn't actually referencewollman1996-01-051-1/+3
| | | | the options.
* Oops, forgot a little difference between my src-tree and ours...sos1995-12-301-2/+2
|
* My first shot at get sound to work on the emulator.sos1995-12-292-7/+108
| | | | | Inspired by the work Amancio Hasty has done, but implemented somewhat differently.
* Update linux_ipc.c to use the now generated prototypes for the shm* callspeter1995-12-151-9/+9
| | | | it makes while emulating the linux equivalents.
* Initial attempt at getting Linux QMAGIC shared lib support. I havepeter1995-12-151-4/+4
| | | | | | | | | | | | | successfully run linux netscape 2.0b3 with a QMAGIC ld.so and libc/libm that I found on some linux machine that I _think_ is running slackware 3.0. There are still problems.. ld.so claims the libraries are the wrong format, but it still runs anyway.. :-/ The QMAGIC ld.so also screams about needing ld.so.cache, and running a linux ldconfig is quite educational. You soon learn to run "chroot /compat/linux /bin/ldconfig" where ldconfig is living in /compat/linux/bin. :-] (Lets just say that it puts loads of symlinks in /usr/lib otherwise :-)
* Clean up some warnings by using the generated structures in <sys/sysproto.h>peter1995-12-155-94/+93
| | | | | for passing to the bsd system calls, rather than inveninting our own equivalent structures.
* Restored a vm #include.bde1995-12-141-1/+2
|
OpenPOWER on IntegriCloud