Commit Graph
198 Commits
Author SHA1 Message Date
Andrew Gallatin 92406b9b55 MFC: fix linux_times() on alpha
Approved by: jkh
2001-03-28 02:33:47 +00:00
Assar Westerlund 906f2e1138 MFC: translate the flags in recvfrom and recvmsg from linux to bsd ones
linux_socket.h: 1.1
	linux_socket.c: 1.25
2001-03-04 08:38:20 +00:00
Jonathan Lemon 6c79edfb69 MFC: correct test ordering for first EISCONN. 2001-03-02 19:31:59 +00:00
Jonathan Lemon a22fe6d13f MFC: r1.26; correct linux connect() emulation. 2001-03-01 21:52:26 +00:00
cvs2svn 08f22b4dfb This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-12-23 19:49:29 +00:00
Andrew Gallatin 6f548d743d MFC: fix a reversed comment 2000-11-22 16:22:44 +00:00
Andrew Gallatin 768a2aa2c2 MFC: use linux_connect() on alpha 2000-11-22 15:39:02 +00:00
Marcel Moolenaar 32cacb342f MFC rev 1.43: Fix linux_getdents syscall.
Approved by: jkh
2000-11-08 02:38:24 +00:00
David E. O'Brien 90e8665be1 Remove a stay include.
Approved by:	JKH
2000-11-03 13:11:18 +00:00
David E. O'Brien 75f73770ab MFC: allow AlphaLinux compat bits to build.
Approved by:	JKH
2000-11-02 23:31:28 +00:00
David E. O'Brien cd698d78ca I took rev 1.55, when I should have taken rev 1.53. 2000-11-01 19:36:44 +00:00
cvs2svn 897138f333 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-10-19 18:18:36 +00:00
cvs2svn 1dcd6440ef This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-10-08 21:34:01 +00:00
cvs2svn 895c13aefa This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-08-28 15:07:59 +00:00
cvs2svn 1a39787b1b This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-08-25 10:07:23 +00:00
cvs2svn 4cd12ae4ad This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-08-23 11:54:11 +00:00
cvs2svn cde10e618a This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-07-27 01:22:25 +00:00
cvs2svn 842f308487 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. 2000-03-13 04:59:44 +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 <[email protected]>
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 <[email protected]>)
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
Marcel Moolenaar dca60efcc9 Convert the filesystem type returned in struct statfs by syscalls
linux_statfs and linux_fstatfs. Linux binaries testing this expect
the filesystem's magic number and not our vnode's tag.

PR: 15425
Tested by: Vladimir N. Silyaev <[email protected]>
2000-01-08 21:09:41 +00:00
Eivind Eklund 762e6b856c Introduce NDFREE (and remove VOP_ABORTOP) 1999-12-15 23:02:35 +00:00
Marcel Moolenaar af3a75ec0d Remove unused includes.
Found by: phk-scan
1999-12-10 12:36:20 +00:00
Archie Cobbs 7ec7564af4 Fix LINT breakage. 1999-12-05 18:49:09 +00:00
Marcel Moolenaar 43bef51567 Implement pluggable ioctl handlers.
Other modules can register and unregister ioctl handlers to extend the
ioctls known by the Linuxulator. A recent application is the vmware
port. The Linuxulator itself uses the new interface to register its
handlers as well. Handlers for the following types of ioctls have been
defined:
	cdrom
	console (=keyboard and VT handling)
	socket
	sound
	termio

All ioctl related defines and declarations have been moved to a new
file (linux_ioctl.h), except for the pluggable ioctl handler interface
definition.

While there, cleanup linux.h some more.

linux.h and linux_ioctl.[ch] have been made to conform to style(9) as
much as possible.

Inspired and reviewed by: Vladimir N. Silyaev
1999-12-04 11:10:22 +00:00
Marcel Moolenaar ec99e32256 Implement linux_sigaltstack. 1999-11-30 15:02:28 +00:00
Alfred Perlstein fac9a03b4e add linuxulator wrapper for SNDCTL_DSP_GETODELAY 1999-11-29 23:03:34 +00:00
Marcel Moolenaar 408da11907 Implement linux_ustat.
Reviewed by: bde
1999-11-27 16:55:14 +00:00
Marcel Moolenaar 25e5bdab9e Implement fdatasync in terms of fsync. The regeneration of proto.h,
syscall.h and sysent.h was probably forgotten after the last change
syscalls.master.
1999-11-26 10:20:10 +00:00
Poul-Henning Kamp 3e30338edd simplify check for device. 1999-11-08 09:59:17 +00:00
Peter Wemm 53c2c4e22b Use fo_stat() rather than Yet Another duplication of kern_descrip.c's stat
code.
1999-11-08 03:33:21 +00:00
Poul-Henning Kamp 923502ff91 useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
Marcel Moolenaar 5a02dbe45a Fix the duplicate filenames that are the result of using getdents.
glibc2 defines struct dirent differently than the Linux kernel does.
The getdents function therefore needs to read a heuristically defined
number of kernel dirents to satisfy the request. In case where too
many kernel dirents have been read, the function lseeks on the
directory so that a next call will start with the right dirent. The
offset used in lseeking is the offset-field in the last dirent passed
to the application. This can only mean that the offset-field holds
the offset of the next dirent and not the offset of the dirent itself.
1999-10-21 09:14:49 +00:00
John Hay 5cdfd8f709 Swap IOC_OUT and IOC_IN for the SETDIR macro. The linux ioctl read and
write bits are swapped.

Reviewed by:	luoqi, marcel
1999-10-06 19:51:37 +00:00
Marcel Moolenaar 956d3333ca sigset_t change (part 4 of 5)
-----------------------------

The compatibility code and/or emulators have been updated:

iBCS2 now mostly uses the older syscalls. SVR4 now properly
handles all signals. This has been achieved by using the
new sigset_t throughout the emulator. The Linuxulator has
been severely updated. Internally the new Linux sigset_t is
made the default. These are then mapped to and from the
new FreeBSD sigset_t.

Also, rt_sigsuspend has been implemented in the Linuxulator.
Implementing this syscall basicly caused all this sigset_t
changing in the first place and the syscall has been used
throughout the change as a means for testing. It basicly is
too much work to undo the implementation so that it can
later be added again.

A special note on the use of sv_sigtbl and sv_sigsize in
struct sysentvec:
Every signal larger than sv_sigsize is not translated and is
passed on to the signal handler unmodified. Signals in the
range 1 upto and including sv_sigsize are translated.
The rationale is that only the system defined signals need to
be translated.

The emulators also have been updated so that the translation
tables are only indexed for valid (system defined) signals.
This change also fixes the translation bug already in the
SVR4 emulator.
1999-09-29 15:12:18 +00:00
Poul-Henning Kamp ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Marcel Moolenaar 1beb0dc732 Linux doesn't complain if you remove a msg queue that doesn't exist
(given the proper permissions).
1999-09-23 09:57:45 +00:00
Luoqi Chen 2323686abc Implement linux_ioperm() syscall. Fix linux_iopl() to use the level argument.
SVGAlib should now work.

Reviewed by:	marcel
1999-09-22 22:01:51 +00:00
Brian Feldman 13ccadd4b0 This is what was "fdfix2.patch," a fix for fd sharing. It's pretty
far-reaching in fd-land, so you'll want to consult the code for
changes.  The biggest change is that now, you don't use
	fp->f_ops->fo_foo(fp, bar)
but instead
	fo_foo(fp, bar),
which increments and decrements the fp refcount upon entry and exit.
Two new calls, fhold() and fdrop(), are provided.  Each does what it
seems like it should, and if fdrop() brings the refcount to zero, the
fd is freed as well.

Thanks to peter ("to hell with it, it looks ok to me.") for his review.
Thanks to msmith for keeping me from putting locks everywhere :)

Reviewed by:	peter
1999-09-19 17:00:25 +00:00
Marcel Moolenaar 13d9e61a67 Fix getcwd. It must return the length of the path including the terminating 0.
While I'm here, fix style and debug printf.

Fix derived from patch by: Darryl Okahata <[email protected]>
1999-09-17 08:35:08 +00:00
Peter Wemm 5a90d999a9 <machine/soundcard.h> -> <sys/soundcard.h>, since it's an exported API
that's arch neutral and OSS API and Linux API compatable.
1999-09-04 14:15:26 +00:00
Marcel Moolenaar 6771d80337 I missed the namechange of field desc in struct i386_ldt_args into descs while
reviewing luoqi's changes...

Pointed out by: luoqi
1999-09-03 06:18:39 +00:00
Marcel Moolenaar ff78e85043 Implementation of the modify_ldt syscall. Use the sysarch() interface to do
the actual work. When USER_LDT is not defined for a kernel, sysarch returns
EOPNOTSUPP. Display a message in that case and return ENOSYS to userland.

Reviewed by: luoqi
1999-09-02 21:50:42 +00:00
Marcel Moolenaar e459b442df Fix a braino: Linux minor device numbers are 8 bits wide and not 10. 1999-08-29 11:47:01 +00:00
Marcel Moolenaar d4c45842d7 Fix a missing '-1' in the size argument of copyout in getgroups. Spotted while
reviewing the MFC in -stable.
1999-08-29 08:52:38 +00:00
Marcel Moolenaar 86f95e6b6d Implement the OSS_GETVERSION ioctl. The version returned can be changed through
the sysctl variable `compat.linux.oss_version'.

PR: 12917
Originator: Dean Lombardo <[email protected]>
1999-08-28 08:43:03 +00:00
Peter Wemm 280652828b $Id$ -> $FreeBSD$ 1999-08-28 02:16:32 +00:00