summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Quick and dirty support for Linux's mremap. Not used by anythingjkh1998-07-101-1/+32
| | | | | | but quake2 AFAIK. Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* remove option LINUX as it did nothing, add DEBUG_LINUX to debug thejmg1998-06-301-1/+3
| | | | | | linux emulation... (actually moved LINUX to opt_dontuse.h)
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* ".. x11amp appears to be calling shmctl(id, IPC_RMID, 0) and the emulationjkh1998-06-021-9/+13
| | | | | | | | layer does not like the null shmid_ds buffer pointer. The emulation layer returned an error without ever calling FreeBSD's shmctl, so the segments were not being deleted when the reference count went to zero." Submitted by: Kevin Street <street@iname.com>
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Make a kernel version of the timer* functions called timerval* to bephk1998-04-061-9/+9
| | | | | | more consistent. OK'ed by: bde
* Use microruntime() rather than doing it by hand.phk1998-04-041-3/+2
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* The linux chown syscall is more like lchown, a new chown syscall thatpeter1998-03-291-1/+22
| | | | follows links was added.
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-1/+2
| | | | used.
* Removed redundant test against MAXDSIZ (the rlimit test is stronger).bde1998-02-251-3/+3
|
* In the words of the submitter:msmith1998-02-071-2/+62
| | | | | | | | | | | | | | | | | | | | | | | ---- I've worked to enhance the connect() patches. I've just tested this with the Linux JDK appletviewer on an applet that does a lot of connects, and it works as well as during my previous tests. The connect() patch is now a merge between my older patch and the OpenBSD stuff. It ensures that any async error is returned by connect() instead of getsockopt(SOL_SOCKET, SO_ERROR) as reasonnable systems do. There are also minor patches to implement IPPROTO_TCP for get/setsocktopt(). These are also tested (with Linux Apache). ---- I would appreciate any feedback regarding these changes, as they'd be very useful in 2.2.6. Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
* Changed `inline' to `__inline' so that this file can be compiled bybde1998-02-031-3/+3
| | | | | | | `gcc -ansi'. Changed NULL to 0 so that this file is more self-sufficient (now only <sys/types.h> is a prerequisite).
* sigh....forgot to update the DEBUG printfjmb1998-01-051-3/+3
| | | | | | | to show both the path and the length args to linux emulation truncate() Submitted by: jmb
* length argument to truncate() in linux emulationjmb1998-01-051-1/+2
| | | | | | | | | was not being set copied to the bsd arguments.. frequently, resulting in files of over 100MB of NULs PR: 386/5044 Reviewed by: jmb Submitted by: (Richard Winkel) rich@math.missouri.edu
* Make hidden COMPAT_43 dependencies explict. Options in headers is aeivind1997-12-161-1/+3
| | | | pain in the backside.
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-2/+6
|
* As described by the submitter:msmith1997-12-151-1/+54
| | | | | | | | | | | These patches enables us to play quake2 . Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE. Support linux virtual terminal operations: OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE. Submitted by: Amancio Hasty <hasty@rah.star-gate.com>
* As described by the submitter:msmith1997-12-141-2/+147
| | | | | | | | | | | | - emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed Note that we do an extra getsockopt() on every sendto() to check if the option is set because we don't keep state in the emulator code. Is there a better way to implement this? - correct a bug (value of "name" not passed) with getsockopt() Submitted by: pb@fasterix.freenix.org (Pierre Beyssac)
* Don't include <sys/lock.h> in headers when only `struct simplelock' isbde1997-12-051-1/+2
| | | | required. Fixed everything that depended on the pollution.
* Added support for linux sound ioctls:ahasty1997-11-171-2/+18
| | | | | | | | | LINUX_SNDCTL_DSP_GETOPTR LINUX_SNDCTL_DSP_GETIPTR LINUX_SNDCTL_DSP_SETTRIGGER LINUX_SNDCTL_DSP_GETCAPS With this rev level the linux realaudio player 5 and xquake should work.
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-067-293/+291
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* Securelevel and formatting fixes, and trapframe simplification.kato1997-10-301-10/+9
| | | | | Reviewed by: sos Submitted by: bde
* Implement linux_iopl and linux_nice.kato1997-10-291-1/+31
|
* Implement linux_semop, linux_semget and linux_semctl.kato1997-10-281-4/+136
| | | | PR: 4355
* Update for changes in the callout interface.gibbs1997-09-211-3/+4
|
* 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
OpenPOWER on IntegriCloud