John Baldwin
fb29c3e083
Protect calcru() with sched_lock.
2001-01-23 20:50:40 +00:00
Josef Karthauser
4c3a3ec075
Instead of hard coding the major numbers for IDE and SCSI disks
...
look in the device's cdevsw for the D_DISK flag.
2001-01-14 23:33:50 +00:00
Paul Richards
7842f151ba
Map FreeBSD character device hard disks to Linux block device hard disks.
...
This fixes the problem with VMWARE not being able to use raw disks.
2000-12-29 00:44:42 +00:00
Assar Westerlund
40dbba5754
translate the flags in recvfrom and recvmsg from linux to bsd ones
...
Approved by: marcel
2000-12-19 00:24:25 +00:00
John Baldwin
216af8221e
Lock access to proc members.
...
Glanced over by: marcel
2000-12-15 19:41:27 +00:00
Marcel Moolenaar
7ec9743293
Remove call to bzero after MALLOC and instead add M_ZERO
...
to MALLOC.
2000-12-05 06:44:22 +00:00
Marcel Moolenaar
b4c6727a3a
Don't auto-generate the syscalls.
2000-12-03 01:30:31 +00:00
Jake Burkholder
4f55983606
Use callout_reset instead of timeout(9). Most callouts are statically
...
allocated, 2 have been added to struct proc for setitimer and sleep.
Reviewed by: jhb, jlemon
2000-11-27 22:52:31 +00:00
Andrew Gallatin
930a65fe47
Use the linux_connect() on alpha rather than passing directly through
...
to our native connect(). This is required to deal with the differences
in the way linux handles connects on non-blocking sockets.
This gets the private beta of the Compaq Linux/alpha JDK working
on FreeBSD/alpha
Approved by: marcel
2000-11-16 01:05:53 +00:00
Marcel Moolenaar
7cf6a3b430
Fix F_SETOWN on pipes. Linux returns EINVAL while we send a SIGIO
...
signal. There's at least 1 program that is known to break.
Submitted patch has been edited to match current code.
MFC: yes
Submitted by: bde
2000-11-13 04:08:56 +00:00
Marcel Moolenaar
ebea866055
Revert auto-generation. The Alpha port is broken.
...
Syncing with it is wrong.
2000-11-10 21:30:19 +00:00
Marcel Moolenaar
2da829a0c8
Sync with Alpha:
...
Do not use sysent.c, proto.h and syscall.h in source tree;
use auto-generated versions.
2000-11-09 07:27:55 +00:00
Marcel Moolenaar
edc5a9dd25
Fix getdents syscall.
...
The offset field in struct dirent was set to the offset of
the next dirent in rev 1.36. The offset was calculated from
the current offset and the record length. This offset does
not necessarily match the real offset when we are using
cookies. Therefore, also use the cookies to set the offset
field in struct dirent if we're using cookies to iterate
through the dirents.
2000-11-05 07:31:17 +00:00
Andrew Gallatin
abb23d13ae
zap a stray include that snuck in with rev 1.56
...
Submitted by: Clive Lin <clive@CirX.ORG>
2000-11-02 18:51:32 +00:00
Andrew Gallatin
323c105fbc
fix a comment that was inadvertantly changed by a cvs merge
...
pointed out by: obrien
2000-11-02 15:04:19 +00:00
Marcel Moolenaar
a4e130249f
Fix linux_ustat syscall. We only have cdevs now, so looking
...
for a block device isn't that useful anymore.
Reported by: Wesley Morgan <morganw@chemicals.tacorp.com>
Submitted by: gallatin
Acknowledged by: phk
2000-11-02 06:08:26 +00:00
Andrew Gallatin
f11610e091
Support for the linux ipc syscalls on the alpha, where each one has
...
its own syscall rather than going through a demux function like
linux_ipc() on i386
2000-11-01 23:17:31 +00:00
Andrew Gallatin
e70ce4d9c5
fix linux_termio and linux_termios structs on alpha. alpha differences
...
are in the termios struct (probably because linux wants to be compatible
with the osf/1 termios struct), not the termio struct.
2000-11-01 22:36:41 +00:00
David E. O'Brien
5231fb2059
The MI/MD split wasn't perfect and the MI files need hacks for the
...
AlphaLinux compat bits. This will be better cleaned up soon.
Agreed to what ever was necessary by: marcel
2000-11-01 19:48:35 +00:00
Andrew Gallatin
7936339495
A start at an implemention of linux_rt_sendsig & linux_rt_sigreturn
...
and associated user-level signal trampoline glue.
Without this patch, an SA_SIGINFO style handler can be installed by a linux
app, but if the handler accesses its sip argument, it will get a garbage
pointer and likely segfault.
We currently supply a valid pointer, but its contents are mainly
garbage. Filling this in properly is future work.
This is the second of 3 commits that will get IBM's JDK 1.3 working with
FreeBSD ...
2000-10-17 00:00:20 +00:00
Poul-Henning Kamp
00d25f512c
Initiate deorbit burn sequence for <machine/console.h>.
...
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.
Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.
2000-10-08 21:34:00 +00:00
Marcel Moolenaar
3f3a4815f4
Whitespace change: (near) KNF
2000-08-26 05:12:16 +00:00
Marcel Moolenaar
4a22d85023
Fix bug in previous commit. We need to trim the limits to fit
...
the datatype (= long). Use ULONG_MAX and LONG_MAX to avoid
creating MD code.
2000-08-26 05:08:10 +00:00
Marcel Moolenaar
eebc2a071f
Re-implement linux_{g|s}etrlimit in terms of {g|s}etrlimit
...
instead of the o{g|s}etrlimit so that the dependency on
COMPAT_43 is removed.
2000-08-26 02:18:41 +00:00
Marcel Moolenaar
bc34729c47
Fix typo in license.
2000-08-25 07:32:24 +00:00
Marcel Moolenaar
ac951e620c
Update include directives.
2000-08-22 01:51:54 +00:00
Marcel Moolenaar
ba9ef45b54
Update include directives.
...
Make linux_to_bsd_sigset and linux_do_sigaction non-static.
Move linux_sigaction. linux_sigsuspend, linux_rt_sigsuspend,
linux_pause and linux_sigaltstack to MD code.
2000-08-22 01:49:54 +00:00
Marcel Moolenaar
a751315ca8
Update include directives.
...
Move linux_select to MD code (i386 compat. syscall).
Move linux_fork, linux_vfork, linux_clone, linux_mmap,
linux_pipe, linux_ioperm, linux_iopl and linux_modify_ldt
to MD code.
2000-08-22 01:46:50 +00:00
Marcel Moolenaar
607d46ef28
Update include directives.
2000-08-22 01:32:14 +00:00
Marcel Moolenaar
afa66fa8ca
Update include directives.
...
Make the sem*, msg* and shm* function non-static as they are
called from MD code.
Move linux_ipc to MD code.
2000-08-22 01:31:23 +00:00
Marcel Moolenaar
6fd44518f2
Update include directives and remove linux_execve.
2000-08-22 01:27:36 +00:00
Marcel Moolenaar
51705ff7da
Provide prototypes for functions used by MD code.
2000-08-22 01:24:36 +00:00
Marcel Moolenaar
4c02bded00
Remove the only use of SCARG and perform dead code elimination.
2000-07-27 01:22:24 +00:00
Marcel Moolenaar
03567510a8
Add bounds checking to stackgap_alloc. Previously it was possible
...
to construct a path that was long enough (ie longer than
SPARE_USRSPACE bytes) and trash the stack.
Note that SPARE_USRSPACE is much smaller than MAXPATHLEN so that
the Linuxulator will now return ENAMETOOLONG even if the path
is smaller than MAXPATHLEN.
PR: 12749
2000-07-23 16:54:18 +00:00
Marcel Moolenaar
a603fe5a07
Revert implementation of setfsuid and setfsgid due to security
...
issues.
Requested by: rwatson
Backed by: kris
2000-07-20 05:37:41 +00:00
Marcel Moolenaar
d5124417a7
Implement pread and pwrite.
...
PR: 17991
Submitted by: Geoffrey Speicher <geoff@caribbean.sea-incorporated.com>
2000-07-17 00:17:07 +00:00
Marcel Moolenaar
ddb48608ab
Implement setfsuid and setfsgid. Implementation derived from patch
...
in PR.
PR: 16993
Submitted by: Bjoern Groenvall <bg@sics.se>
2000-07-16 21:23:34 +00:00
Marcel Moolenaar
fbdf894562
Simplify the F_GETOWN and F_SETOWN fcntl commands. The workaround
...
is not needed since the FreeBSD native implementation switched
from TIOC{G|S}PGRP to FIO{G|S}ETOWN (kern_descrip.c rev 1.55).
PR: 16946
Submitted by: Victor Salaman <salaman@teknos.com>
2000-07-15 22:33:24 +00:00
Poul-Henning Kamp
77978ab8bc
Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.
...
Pointed out by: bde
2000-07-04 11:25:35 +00:00
Poul-Henning Kamp
82d9ae4e32
Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
...
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:
-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
2000-07-03 09:35:31 +00:00
Martin Cracauer
6f6b2cd019
Linux allows to mmap annonymous with a file descriptor passed, FreeBSD
...
doesn't. In the Linux emulation layer, ignore the fd passed when
MAP_ANON is specified.
Known application to be fixed: Xanalys/Harlequin Lispworks
Also improve debug output for mmap, now showing what the emulation
layer mapped to what (-DDEBUG).
Reviewed by: marcel
2000-06-15 09:57:34 +00:00
Jake Burkholder
e39756439c
Back out the previous change to the queue(3) interface.
...
It was not discussed and should probably not happen.
Requested by: msmith and others
2000-05-26 02:09:24 +00:00
Jake Burkholder
740a1973a6
Change the way that the queue(3) structures are declared; don't assume that
...
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
2000-05-23 20:41:01 +00:00
Poul-Henning Kamp
2c9b67a8df
Remove unneeded #include <vm/vm_zone.h>
...
Generated by: src/tools/tools/kerninclude
2000-04-30 18:52:11 +00:00
Nick Sayer
c36837a8d8
Fix some style bugs. The long line is in a chunk of code that's
...
being rewritten, though.
Submitted by: bde
2000-03-13 15:27:19 +00:00
Marcel Moolenaar
3c1124cfdf
Fix bug in linux_wait4 and linux_waitpid where garbage in the status
...
argument could panic the kernel.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Prompted by: jkh, gallatin
Approved by: prompters
2000-03-09 17:52:01 +00:00
Nick Sayer
9deb82d478
Implement Linux BLKGETSIZE ioctl, and open the door to implementing
...
other BLK.* ioctls should the desire arize.
Approved by: jkh (via dufault)
2000-03-09 15:14:14 +00:00
Marcel Moolenaar
dba5ab6662
Fix accept(2) behavior in that accepted sockets don't inherit the
...
parents flags.
Note on the PR:
The PR contains another patch that's not being committed without
further background information. The PR stays open for now.
PR: 16946 (Victor A. Salaman <salaman@teknos.com>)
Prompted by: msmith
Indirect/implicit approval: jkh (shoot me if I'm wrong :-)
2000-02-28 18:58:59 +00:00
Nick Sayer
651e921455
Avoid passing an uninitialized structure member to the real
...
READSUBCHANNEL ioctl. This makes vmware work with SCSI CDROM
drives.
Approved by: jkh
2000-02-01 16:20:24 +00:00
Marcel Moolenaar
759eb4613e
Return Linux kernel version 2.2.12 by default. This is in line
...
with linux_base-6.1.
2000-01-10 13:09:08 +00:00