Commit Graph

194 Commits

Author SHA1 Message Date
John Polstra
22d4b0fb41 Add provisions for variant core dump file formats, depending on the
object format of the executable being dumped.  This is the first
step toward producing ELF core dumps in the proper format.  I will
commit the code to generate the ELF core dumps Real Soon Now.  In
the meantime, ELF executables won't dump core at all.  That is
probably no less useful than dumping a.out-style core dumps as they
have done until now.

Submitted by:	Alex <garbanzo@hooked.net> (with very minor changes by me)
1998-09-14 05:36:51 +00:00
Jordan K. Hubbard
e11952d397 Argh! *Now* the correct 3.0 fix is committed. 1998-08-31 10:53:33 +00:00
Jordan K. Hubbard
51509b513f Whoops! Stamp out a 2.2-ism that snuck between branches here. 1998-08-31 10:51:19 +00:00
Jordan K. Hubbard
2394cd9adb Initial support for using linux X servers under emulation - to use an
XFree86 server, users need to create the following links in their
/compat/linux/dev directory (assuming kernel configured with 4 VTs).

lrwxrwxrwx  1 root  wheel  7 Aug 30 22:59 tty0 -> console
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty1 -> ttyv0
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty2 -> ttyv1
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty3 -> ttyv2
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty4 -> ttyv3

VT switching is still not yet supported. Attempting to switch VT
currently will cause Xserver bus error.

Submitted by:	Chain Lee <chain@110.net>
1998-08-31 06:55:02 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans
24382fa41f Oops, the previous fix confused Linux's sigset_t with a pointer type.
It can be integral or a struct in POSIX, so it is difficult to print,
but it is actually declared as unsigned long.  Assume that it is
unsigned integral.
1998-08-15 22:29:43 +00:00
Bruce Evans
882fdeae66 Converted the second last instance of hzto() to tvtohz().
Fixed nearby bugs (in linux_alarm()):
- the itimer for the alarm was relative to the epoch instead of relative
  to the boot time.  This was harmless because the itimer's interval is 0.
- the seconds arg was not checked for validity before converting it to a
  possibly different value.
- printf format errors.

Improvements:
Don't use splclock().  splsoftclock() suffices.  Don't complicate things
by micro-optimizing interrupt latency.

Minor improvements:
Various micro-optimizations to exploit the specialness of the alarm itimer
and the value 0.
1998-08-05 16:44:30 +00:00
Bruce Evans
e4e6ae1366 Fixed print format errors. 1998-07-29 16:43:00 +00:00
Bruce Evans
e33e271f08 Fixed printf format errors.
Use offsetof() instead of null pointer hacks.  Use a home made offsetof()
because including <stddef.h> is not permitted in LKMs.
1998-07-29 15:50:41 +00:00
Jordan K. Hubbard
d14897d381 Quick and dirty support for Linux's mremap. Not used by anything
but quake2 AFAIK.

Submitted by:   Luoqi Chen <luoqi@watermarkgroup.com>
1998-07-10 22:30:08 +00:00
John-Mark Gurney
b039fc4c34 remove option LINUX as it did nothing, add DEBUG_LINUX to debug the
linux emulation...

(actually moved LINUX to opt_dontuse.h)
1998-06-30 08:40:33 +00:00
Bruce Evans
39b14624c5 Updated generated files. 1998-06-09 03:36:59 +00:00
Bruce Evans
9ae58db7a3 Include "opt_compat.h" explicitly instead of depending on
makesyscalls.sh generating it as pollution.

Don't attempt to separate the includes by newlines.  makesyscalls.sh
just ignores newlines.
1998-06-09 03:28:14 +00:00
Bruce Evans
414c93f3aa Updated generated files. 1998-06-08 11:08:35 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
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.
1998-06-07 17:13:14 +00:00
Jordan K. Hubbard
ba98833992 ".. x11amp appears to be calling shmctl(id, IPC_RMID, 0) and the emulation
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>
1998-06-02 12:38:31 +00:00
Poul-Henning Kamp
c21410e119 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
Eivind Eklund
d563a53a79 Unbotch whitespace and change switch with two cases to if.
Noticed by:	bde
1998-05-07 00:42:25 +00:00
Eivind Eklund
288078be0f Translate T_PROTFLT to SIGSEGV instead of SIGBUS when running under
Linux emulation.  This make Allegro Common Lisp 4.3 work under
FreeBSD!

Submitted by: Fred Gilham <gilham@csl.sri.com>
Commented on by: bde, dg, msmith, tg
Hoping he got everything right:  eivind
1998-04-28 18:15:08 +00:00
Søren Schmidt
958a082931 Added EIDRM & ENOMSG to errno translation table. 1998-04-13 17:49:51 +00:00
Poul-Henning Kamp
4cf41af3d4 Make a kernel version of the timer* functions called timerval* to be
more consistent.

OK'ed by:	bde
1998-04-06 08:26:08 +00:00
Poul-Henning Kamp
cc6447a365 Use microruntime() rather than doing it by hand. 1998-04-04 18:56:54 +00:00
Poul-Henning Kamp
227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"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
1998-03-30 09:56:58 +00:00
Peter Wemm
00d21a1337 regenerate 1998-03-29 08:04:49 +00:00
Peter Wemm
1e8dabab3f The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
1998-03-29 07:59:10 +00:00
Peter Wemm
d5e73b9fe5 Patch up some space/tab problems. It looks like some of this came
from an xterm via cut/paste.  No other changes apart from whitespace.
1998-03-29 07:53:19 +00:00
Peter Wemm
c740a51211 Add in placeholders for the newer linux syscalls 1998-03-29 06:35:22 +00:00
Peter Dufault
8a6472b723 Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51:01 +00:00
Bruce Evans
08637435f2 Moved some #includes from <sys/param.h> nearer to where they are actually
used.
1998-03-28 10:33:27 +00:00
John Birrell
afe4dfa050 Added a null entry for sysmk that is generated by makesyscalls.sh.
Gee, I wish there was a better way to run makesyscalls.sh so that
a make world finds missing things like this. Running it manually
sucks.

Pointed out by: Peter Dufault
1998-03-13 19:13:54 +00:00
Bruce Evans
770a5f7ec9 Removed redundant test against MAXDSIZ (the rlimit test is stronger). 1998-02-25 05:33:06 +00:00
Bruce Evans
9d767d027e Staticized. 1998-02-13 07:34:52 +00:00
Eivind Eklund
d131a704ed De-staticize enough to make all the LKMs work again. Add comments where
deemed relevant.
1998-02-11 01:46:50 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Mike Smith
dad3b88ae3 In the words of the submitter:
----
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)
1998-02-07 02:13:27 +00:00
Eivind Eklund
0b08f5f737 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
Eivind Eklund
47cfdb166d Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
Bruce Evans
2625bd3484 Declare printf() instead of including <stdio.h>, so that this doesn't
depend on anything outside of the "sys" tree.
1998-02-01 18:47:56 +00:00
Jonathan M. Bresler
080ea93df2 sigh....forgot to update the DEBUG printf
to show both the path and the length args
	to linux emulation truncate()

Submitted by:		jmb
1998-01-05 01:17:42 +00:00
Jonathan M. Bresler
1c4faf8bb9 length argument to truncate() in linux emulation
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
1998-01-05 01:05:15 +00:00
KATO Takenori
76ef01374e Regenerate (fix argument of linux_nice). 1997-12-17 03:16:11 +00:00
KATO Takenori
c7da3245da I should not edit linux_prot.h directly. Fix the argument of linux_nice.
Pointed out by:	Eivind Eklund <eivind@FreeBSD.ORG>
	NOPROTO	LINUX	{ int getpgrp(void); }
66	NOPROTO	LINUX	{ int setsid(void); }
67	STD	LINUX	{ int linux_sigaction(int sig, \
			    struct linux_sigaction *nsa, \
			    struct linux_sigaction *osa); }
68	STD	LINUX	{ int linux_siggetmask(void); }
69	STD	LINUX	{ int linux_sigsetmask(linux_sigset_t mask); }
70	NOPROTO	LINUX	{ int setreuid(int ruid, int euid); }
71	NOPROTO	LINUX	{ int setregid(int rgid, int egid); }
72	STD	LINUX	{ int linux_sigsuspend(int restart, \
			    linux_sigset_t oldmask, linux_sigset_t mask); }
73	STD	LINUX	{ int linux_sigpending(linux_sigset_t *mask); }
74	NOPROTO	LINUX	{ int osethostname(char *hostname, \
			    u_int len);}
75	NOPROTO	LINUX	{ int osetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
76	NOPROTO	LINUX	{ int ogetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
77	NOPROTO	LINUX	{ int getrusage(int who, struct rusage *rusage); }
78	NOPROTO	LINUX	{ int gettimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
79	NOPROTO	LINUX	{ int settimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
80	NOPROTO	LINUX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
81	NOPROTO	LINUX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
82	STD	LINUX	{ int linux_select(struct linux_select_argv *ptr); }
83	STD	LINUX	{ int linux_symlink(char *path, char *to); }
84	NOPROTO	LINUX	{ int ostat(char *path, struct ostat *up); }
85	STD	LINUX	{ int linux_readlink(char *name, char *buf, \
			    int count); }
86	STD	LINUX	{ int linux_uselib(char *library); }
87	NOPROTO	LINUX	{ int swapon(char *name); }
88	NOPROTO	LINUX	{ int reboot(int opt); }
89	STD	LINUX	{ int linux_readdir(int fd, struct linux_dirent *dent, \
			    unsigned int count); }
90	STD	LINUX	{ int linux_mmap(struct linux_mmap_argv *ptr); }
91	NOPROTO	LINUX	{ int munmap(caddr_t addr, int len); }
92	STD	LINUX	{ int linux_truncate(char *path, long length); }
93	NOPROTO	LINUX	{ int oftruncate(int fd, long length); }
94	NOPROTO	LINUX	{ int fchmod(int fd, int mode); }
95	NOPROTO	LINUX	{ int fchown(int fd, int uid, int gid); }
96	NOPROTO	LINUX	{ int getpriority(int which, int who); }
97	NOPROTO	LINUX	{ int setpriority(int which, int who, int prio); }
98	NOPROTO	LINUX	{ int profil(caddr_t samples, u_int size, \
			    u_int offset, u_int scale); }
99	STD	LINUX	{ int linux_statfs(char *path, \
			    struct linux_statfs_buf *buf); }
100	STD	LINUX	{ int linux_fstatfs(int fd, \
			    struct linux_statfs_buf *buf); }
101	STD	LINUX	{ int linux_ioperm(unsigned int lo, \
			    unsigned int hi, int val); }
102	STD	LINUX	{ int linux_socketcall(int what, void *args); }
103	STD	LINUX	{ int linux_ksyslog(int what); }
104	STD	LINUX	{ int linux_setitimer(u_int which, \
			    struct itimerval *itv, struct itimerval *oitv); }
105	STD	LINUX	{ int linux_getitimer(u_int which, \
			    struct itimerval *itv); }
106	STD	LINUX	{ int linux_newstat(char *path, \
			    struct linux_newstat *buf); }
107	STD	LINUX	{ int linux_newlstat(char *path, \
			    struct linux_newstat *buf); }
108	STD	LINUX	{ int linux_newfstat(int fd, struct linux_newstat *buf); }
109	STD	LINUX	{ int linux_uname(struct linux_old_utsname *up); }
110	STD	LINUX	{ int linux_iopl(int level); }
111	STD	LINUX	{ int linux_vhangup(void); }
112	STD	LINUX	{ int linux_idle(void); }
113	STD	LINUX	{ int linux_vm86(void); }
114	STD	LINUX	{ int linux_wait4(int pid, int *status, \
			    int options, struct rusage *rusage); }
115	STD	LINUX	{ int linux_swapoff(void); }
116	STD	LINUX	{ int linux_sysinfo(void); }
117	STD	LINUX	{ int linux_ipc(int what, int arg1, int arg2, int arg3, \
			    caddr_t ptr); }
118	NOPROTO	LINUX	{ int fsync(int fd); }
119	STD	LINUX	{ int linux_sigreturn(struct linux_sigcontext *scp); }
access
1997-12-17 03:12:35 +00:00
Eivind Eklund
8438b90fd3 Make hidden COMPAT_43 dependencies explict. Options in headers is a
pain in the backside.
1997-12-16 18:49:23 +00:00
Eivind Eklund
5591b823d1 Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
Mike Smith
7ebfc603cf As described by the submitter:
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>
1997-12-15 06:09:11 +00:00
Mike Smith
f2477ae13d As described by the submitter:
- 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)
1997-12-14 03:17:54 +00:00
Bruce Evans
1cd52ec333 Don't include <sys/lock.h> in headers when only `struct simplelock' is
required.  Fixed everything that depended on the pollution.
1997-12-05 19:55:52 +00:00
Amancio Hasty
53eaeb96ba Added support for linux sound ioctls:
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.
1997-11-17 04:00:32 +00:00
Poul-Henning Kamp
cb226aaa62 Move the "retval" (3rd) parameter from all syscall functions and put
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.
1997-11-06 19:29:57 +00:00
KATO Takenori
1d07b128d5 Securelevel and formatting fixes, and trapframe simplification.
Reviewed by:	sos
Submitted by:	bde
1997-10-30 10:53:30 +00:00
KATO Takenori
404c835d69 Implement linux_iopl and linux_nice. 1997-10-29 08:17:14 +00:00
KATO Takenori
9b86a4168f Implement linux_semop, linux_semget and linux_semctl.
PR:		4355
1997-10-28 10:50:02 +00:00
Justin T. Gibbs
3544218335 Update for changes in the callout interface. 1997-09-21 21:43:54 +00:00
Bruce Evans
1c86c3f605 Removed unused #includes (<machine/cpu.h> now gives more pollution). 1997-09-01 02:12:39 +00:00
Bruce Evans
17bd614dd9 Fixed misplaced declaration. 1997-08-25 23:41:39 +00:00
Bruce Evans
f9a4e5c528 Minor formatting and style fixes. 1997-08-25 23:36:23 +00:00
Philippe Charnier
40d5099441 Revert my previous commit about using CS_SECURE macro.
Requested by:	Bruce.
1997-08-21 06:33:04 +00:00
Philippe Charnier
15f3549108 Use CS_SECURE macro.
Reviewed by:	John Dyson
1997-08-18 06:58:59 +00:00
Søren Schmidt
3c3549f6e7 Ops the arguments to copyin was in the wrong order..
This has survived since the first version, sigh.
1997-08-10 18:15:20 +00:00
Bruce Evans
293a9e510c Removed unused #includes. 1997-07-20 16:06:08 +00:00
Bruce Evans
5f2d49adc9 Fixed data+bss limit (use the current rlimit instead of MAXDSIZ). 1997-07-20 14:21:36 +00:00
Doug Rabson
50ef24000a Make this thing actually compile. 1997-06-02 10:43:41 +00:00
Mike Smith
10484b859e Grr. Remove not-ready LDT modification fluff that also crept in with
the last commit.
1997-06-02 06:45:17 +00:00
Mike Smith
88e2b22c9f Oops, remove some bogus debugging code that crept in with the last commit. 1997-06-02 06:33:22 +00:00
Mike Smith
3713cbff75 Add support for the SIOCGIFHWADDR ioctl, commonly used by
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".
1997-06-02 06:31:49 +00:00
Peter Wemm
213fdd8050 md_regs is a struct trapframe * now, not int [] 1997-05-07 20:05:45 +00:00
Mike Smith
28f6972b6e Always include PROT_READ for Linux mmap operations.
Submitted by:	Hannu Savolainen <hannu@voxware.pp.fi> via jkh
1997-04-28 02:53:17 +00:00
John Dyson
5856e12e69 Fully implement vfork. Vfork is now much much faster than even our
fork. (On my machine, fork is about 240usecs, vfork is 78usecs.)

Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory
	from the other threads of a group.

Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating
	possible existing shares with other threads/processes.

Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a
	thread from the rest of the group.

Fix the case where a thread does an exec.  It is almost nonsense for a thread
	to modify the other threads address space by an exec, so we
	now automatically divorce the address space before modifying it.
1997-04-13 01:48:35 +00:00
Bruce Evans
fb36e0817c Regenerate (removed unused #includes in linux_sysent.c). 1997-04-09 15:37:04 +00:00
Bruce Evans
cfb1738cb3 Removed unused #includes. 1997-04-09 15:34:09 +00:00
Doug Rabson
c9e191b82a Remove dependancy on UFS' DIRBLKSIZ definition.
2.2 candidate.

Submitted by:	bde
1997-04-06 10:10:50 +00:00
Doug Rabson
d41979a063 Fix linux_getdents so that it can cope with filesystems which translate
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.
1997-04-05 14:50:56 +00:00
Bruce Evans
3f39dbc52d Removed potentially harmful garbage <vm/lock.h> and fixed bogus
use of it.  It was actually harmless because the use was null due
to fortuitous include orders and identical (wrong) idempotency
macros.
1997-04-01 08:39:07 +00:00
Peter Wemm
bf07edd9e3 Renerate (some include files were changed) 1997-03-29 13:12:46 +00:00
Peter Wemm
e58a2e4c46 Be consistant with the other syscall makefile's handling of the default
target (ie: don't do anything accidently)
1997-03-29 11:17:26 +00:00
Peter Wemm
d30ea4f53b Fix the warning when compiling the SYSINIT hook due to function types. 1997-03-29 10:50:27 +00:00
Peter Wemm
2b81b1431e Forgot $Id$, break a long line 1997-03-29 10:48:49 +00:00
Peter Wemm
64f873e1f3 Add a Makefile for regenerating the syscall tables 1997-03-29 10:45:39 +00:00
Bruce Evans
71455815cc Don't include <sys/ioctl.h> in the kernel. Stage 3: include
<sys/filio.h> instead of <sys/ioctl.h> in non-network non-tty files.
1997-03-24 11:37:53 +00:00
Bruce Evans
fce002fdef Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
Bruce Evans
3ac4d1ef0c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.
Fixed everything that depended on getting fcntl.h stuff from the wrong
place.  Most things don't depend on file.h stuff at all.
1997-03-23 03:37:54 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Mike Pritchard
b49b12158f Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.

Also silenced a -Wall warning.
1997-02-10 16:34:16 +00:00
John Dyson
996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
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>
1997-02-10 02:22:35 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard
5f1f670543 *Ahem* - opt_rlimit.h does not exist in the LKM case. This was another
2.2 build-breaker.. :(
1996-12-23 06:37:23 +00:00
Joerg Wunsch
e9822d926c Make DFLDSIZ and MAXDSIZ fully-supported options.
"Don't forget to do a ``make depend''" :-)
1996-12-22 23:17:09 +00:00
Bruce Evans
bb65f5a1cc Fixed lseek() on named pipes. It always succeeded but should always fail.
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).
1996-12-19 19:42:37 +00:00
Bill Fenner
66ff6a3c1b Add IP_OPTIONS and the multicast-related setsockopts to the
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)
1996-12-03 02:52:29 +00:00
Sujal Patel
e89054370f Add audio mixer ioctls.
Only writing to the mixer is implemented.
1996-11-05 02:04:37 +00:00
Bruce Evans
484141f666 Declare pointers to signal handling functions in full instead of as
sig_t's so that <sys/signal.h> isn't a prerequisite.
1996-10-25 16:20:34 +00:00
Søren Schmidt
ea5a2b2e00 Prepare kernel to take advantage of "branded" ELF binaries. 1996-10-16 17:51:08 +00:00
Bruce Evans
62c3734cbe Updated #includes to 4.4lite style. 1996-10-15 19:22:46 +00:00
Bruce Evans
aad9af2ba3 Removed nested include of <sys/proc.h> from <vm/vm_object.h> and fixed
the one place that depended on it.  wakeup() is now prototyped in
<sys/systm.h> so that it is normally visible.

Added nested include of <sys/queue.h> in <vm/vm_object.h>.  The queue
macros are a more fundamental prerequisite for <vm/vm_object.h> than
the wakeup prototype and previously happened to be included by
namespace pollution from <sys/proc.h> or elsewhere.
1996-10-15 18:24:34 +00:00
Bruce Evans
6bce784d06 Changed type of ni_dirp in struct namei' from caddr_t to const char *'
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.
1996-09-03 23:17:15 +00:00
Bruce Evans
f58609f0c6 Fixed some more easy cases of const poisoning in the kernel. Cosmetic. 1996-09-03 22:19:16 +00:00
Nate Williams
d0dc9fdb98 Fix memory leak bug in the path parsing code which never released it's
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
1996-08-05 20:52:30 +00:00
Bruce Evans
6fe10f76c3 Removed unused #include. Linux doesn't support SCO consoles. 1996-06-23 17:08:11 +00:00
John Dyson
6ead3edd9c Clean-up the new VM map procfs code, and also add support for executable
format file "etype".  It contains a description of the binary type for
a process.
1996-06-18 05:16:00 +00:00
Gary Palmer
c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00