Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
/* $NetBSD: ibcs2_ioctl.c,v 1.6 1995/03/14 15:12:28 scottb Exp $ */
|
|
|
|
|
2005-01-06 23:22:04 +00:00
|
|
|
/*-
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
* Copyright (c) 1994, 1995 Scott Bartram
|
1994-10-14 08:53:16 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
* based on compat/sunos/sun_ioctl.c
|
|
|
|
*
|
1994-10-14 08:53:16 +00:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. The name of the author may not be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission
|
1994-10-14 08:53:16 +00:00
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2003-06-02 06:48:51 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
1994-10-14 08:53:16 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
2011-08-11 12:30:23 +00:00
|
|
|
#include <sys/capability.h>
|
2001-05-01 08:13:21 +00:00
|
|
|
#include <sys/consio.h>
|
1997-03-23 03:37:54 +00:00
|
|
|
#include <sys/fcntl.h>
|
1994-10-14 08:53:16 +00:00
|
|
|
#include <sys/file.h>
|
|
|
|
#include <sys/filedesc.h>
|
1997-03-24 11:37:53 +00:00
|
|
|
#include <sys/filio.h>
|
2000-10-08 21:34:00 +00:00
|
|
|
#include <sys/kbio.h>
|
2001-05-01 08:13:21 +00:00
|
|
|
#include <sys/lock.h>
|
|
|
|
#include <sys/mutex.h>
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
#include <sys/sysproto.h>
|
2001-05-01 08:13:21 +00:00
|
|
|
#include <sys/tty.h>
|
1994-10-14 08:53:16 +00:00
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
#include <i386/ibcs2/ibcs2_signal.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_socksys.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_stropts.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_proto.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_termios.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_util.h>
|
|
|
|
#include <i386/ibcs2/ibcs2_ioctl.h>
|
1994-10-14 08:53:16 +00:00
|
|
|
|
2002-03-20 05:48:58 +00:00
|
|
|
static void stios2btios(struct ibcs2_termios *, struct termios *);
|
|
|
|
static void btios2stios(struct termios *, struct ibcs2_termios *);
|
|
|
|
static void stios2stio(struct ibcs2_termios *, struct ibcs2_termio *);
|
|
|
|
static void stio2stios(struct ibcs2_termio *, struct ibcs2_termios *);
|
1994-10-14 08:53:16 +00:00
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
/*
|
|
|
|
* iBCS2 ioctl calls.
|
|
|
|
*/
|
|
|
|
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
|
|
|
struct speedtab {
|
|
|
|
int sp_speed; /* Speed. */
|
|
|
|
int sp_code; /* Code. */
|
|
|
|
};
|
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
static struct speedtab sptab[] = {
|
|
|
|
{ 0, 0 },
|
|
|
|
{ 50, 1 },
|
|
|
|
{ 75, 2 },
|
|
|
|
{ 110, 3 },
|
|
|
|
{ 134, 4 },
|
|
|
|
{ 135, 4 },
|
|
|
|
{ 150, 5 },
|
|
|
|
{ 200, 6 },
|
|
|
|
{ 300, 7 },
|
|
|
|
{ 600, 8 },
|
|
|
|
{ 1200, 9 },
|
|
|
|
{ 1800, 10 },
|
|
|
|
{ 2400, 11 },
|
|
|
|
{ 4800, 12 },
|
|
|
|
{ 9600, 13 },
|
|
|
|
{ 19200, 14 },
|
|
|
|
{ 38400, 15 },
|
|
|
|
{ -1, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
static u_long s2btab[] = {
|
|
|
|
0,
|
|
|
|
50,
|
|
|
|
75,
|
|
|
|
110,
|
|
|
|
134,
|
|
|
|
150,
|
|
|
|
200,
|
|
|
|
300,
|
|
|
|
600,
|
|
|
|
1200,
|
|
|
|
1800,
|
|
|
|
2400,
|
|
|
|
4800,
|
|
|
|
9600,
|
|
|
|
19200,
|
|
|
|
38400,
|
|
|
|
};
|
|
|
|
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
|
|
|
static int
|
|
|
|
ttspeedtab(int speed, struct speedtab *table)
|
|
|
|
{
|
|
|
|
|
|
|
|
for ( ; table->sp_speed != -1; table++)
|
|
|
|
if (table->sp_speed == speed)
|
|
|
|
return (table->sp_code);
|
|
|
|
return (-1);
|
|
|
|
}
|
|
|
|
|
1994-10-14 08:53:16 +00:00
|
|
|
static void
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stios2btios(st, bt)
|
|
|
|
struct ibcs2_termios *st;
|
|
|
|
struct termios *bt;
|
1994-10-14 08:53:16 +00:00
|
|
|
{
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
register u_long l, r;
|
|
|
|
|
|
|
|
l = st->c_iflag; r = 0;
|
|
|
|
if (l & IBCS2_IGNBRK) r |= IGNBRK;
|
|
|
|
if (l & IBCS2_BRKINT) r |= BRKINT;
|
|
|
|
if (l & IBCS2_IGNPAR) r |= IGNPAR;
|
|
|
|
if (l & IBCS2_PARMRK) r |= PARMRK;
|
|
|
|
if (l & IBCS2_INPCK) r |= INPCK;
|
|
|
|
if (l & IBCS2_ISTRIP) r |= ISTRIP;
|
|
|
|
if (l & IBCS2_INLCR) r |= INLCR;
|
|
|
|
if (l & IBCS2_IGNCR) r |= IGNCR;
|
|
|
|
if (l & IBCS2_ICRNL) r |= ICRNL;
|
|
|
|
if (l & IBCS2_IXON) r |= IXON;
|
|
|
|
if (l & IBCS2_IXANY) r |= IXANY;
|
|
|
|
if (l & IBCS2_IXOFF) r |= IXOFF;
|
|
|
|
if (l & IBCS2_IMAXBEL) r |= IMAXBEL;
|
|
|
|
bt->c_iflag = r;
|
|
|
|
|
|
|
|
l = st->c_oflag; r = 0;
|
|
|
|
if (l & IBCS2_OPOST) r |= OPOST;
|
|
|
|
if (l & IBCS2_ONLCR) r |= ONLCR;
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
|
|
|
if (l & IBCS2_TAB3) r |= TAB3;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
bt->c_oflag = r;
|
|
|
|
|
|
|
|
l = st->c_cflag; r = 0;
|
|
|
|
switch (l & IBCS2_CSIZE) {
|
|
|
|
case IBCS2_CS5: r |= CS5; break;
|
|
|
|
case IBCS2_CS6: r |= CS6; break;
|
|
|
|
case IBCS2_CS7: r |= CS7; break;
|
|
|
|
case IBCS2_CS8: r |= CS8; break;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
if (l & IBCS2_CSTOPB) r |= CSTOPB;
|
|
|
|
if (l & IBCS2_CREAD) r |= CREAD;
|
|
|
|
if (l & IBCS2_PARENB) r |= PARENB;
|
|
|
|
if (l & IBCS2_PARODD) r |= PARODD;
|
|
|
|
if (l & IBCS2_HUPCL) r |= HUPCL;
|
|
|
|
if (l & IBCS2_CLOCAL) r |= CLOCAL;
|
|
|
|
bt->c_cflag = r;
|
|
|
|
|
2001-07-20 06:00:02 +00:00
|
|
|
bt->c_ispeed = bt->c_ospeed = s2btab[l & 0x0000000f];
|
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
l = st->c_lflag; r = 0;
|
|
|
|
if (l & IBCS2_ISIG) r |= ISIG;
|
|
|
|
if (l & IBCS2_ICANON) r |= ICANON;
|
|
|
|
if (l & IBCS2_ECHO) r |= ECHO;
|
|
|
|
if (l & IBCS2_ECHOE) r |= ECHOE;
|
|
|
|
if (l & IBCS2_ECHOK) r |= ECHOK;
|
|
|
|
if (l & IBCS2_ECHONL) r |= ECHONL;
|
|
|
|
if (l & IBCS2_NOFLSH) r |= NOFLSH;
|
|
|
|
if (l & IBCS2_TOSTOP) r |= TOSTOP;
|
|
|
|
bt->c_lflag = r;
|
|
|
|
|
|
|
|
bt->c_cc[VINTR] =
|
|
|
|
st->c_cc[IBCS2_VINTR] ? st->c_cc[IBCS2_VINTR] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VQUIT] =
|
|
|
|
st->c_cc[IBCS2_VQUIT] ? st->c_cc[IBCS2_VQUIT] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VERASE] =
|
|
|
|
st->c_cc[IBCS2_VERASE] ? st->c_cc[IBCS2_VERASE] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VKILL] =
|
|
|
|
st->c_cc[IBCS2_VKILL] ? st->c_cc[IBCS2_VKILL] : _POSIX_VDISABLE;
|
1996-03-28 19:53:21 +00:00
|
|
|
if (bt->c_lflag & ICANON) {
|
|
|
|
bt->c_cc[VEOF] =
|
|
|
|
st->c_cc[IBCS2_VEOF] ? st->c_cc[IBCS2_VEOF] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VEOL] =
|
|
|
|
st->c_cc[IBCS2_VEOL] ? st->c_cc[IBCS2_VEOL] : _POSIX_VDISABLE;
|
|
|
|
} else {
|
|
|
|
bt->c_cc[VMIN] = st->c_cc[IBCS2_VMIN];
|
|
|
|
bt->c_cc[VTIME] = st->c_cc[IBCS2_VTIME];
|
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
bt->c_cc[VEOL2] =
|
|
|
|
st->c_cc[IBCS2_VEOL2] ? st->c_cc[IBCS2_VEOL2] : _POSIX_VDISABLE;
|
|
|
|
#if 0
|
|
|
|
bt->c_cc[VSWTCH] =
|
|
|
|
st->c_cc[IBCS2_VSWTCH] ? st->c_cc[IBCS2_VSWTCH] : _POSIX_VDISABLE;
|
|
|
|
#endif
|
|
|
|
bt->c_cc[VSTART] =
|
|
|
|
st->c_cc[IBCS2_VSTART] ? st->c_cc[IBCS2_VSTART] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VSTOP] =
|
|
|
|
st->c_cc[IBCS2_VSTOP] ? st->c_cc[IBCS2_VSTOP] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VSUSP] =
|
|
|
|
st->c_cc[IBCS2_VSUSP] ? st->c_cc[IBCS2_VSUSP] : _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VDSUSP] = _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VREPRINT] = _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VDISCARD] = _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VWERASE] = _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VLNEXT] = _POSIX_VDISABLE;
|
|
|
|
bt->c_cc[VSTATUS] = _POSIX_VDISABLE;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
btios2stios(bt, st)
|
|
|
|
struct termios *bt;
|
|
|
|
struct ibcs2_termios *st;
|
1994-10-14 08:53:16 +00:00
|
|
|
{
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
register u_long l, r;
|
|
|
|
|
|
|
|
l = bt->c_iflag; r = 0;
|
|
|
|
if (l & IGNBRK) r |= IBCS2_IGNBRK;
|
|
|
|
if (l & BRKINT) r |= IBCS2_BRKINT;
|
|
|
|
if (l & IGNPAR) r |= IBCS2_IGNPAR;
|
|
|
|
if (l & PARMRK) r |= IBCS2_PARMRK;
|
|
|
|
if (l & INPCK) r |= IBCS2_INPCK;
|
|
|
|
if (l & ISTRIP) r |= IBCS2_ISTRIP;
|
|
|
|
if (l & INLCR) r |= IBCS2_INLCR;
|
|
|
|
if (l & IGNCR) r |= IBCS2_IGNCR;
|
|
|
|
if (l & ICRNL) r |= IBCS2_ICRNL;
|
|
|
|
if (l & IXON) r |= IBCS2_IXON;
|
|
|
|
if (l & IXANY) r |= IBCS2_IXANY;
|
|
|
|
if (l & IXOFF) r |= IBCS2_IXOFF;
|
|
|
|
if (l & IMAXBEL) r |= IBCS2_IMAXBEL;
|
|
|
|
st->c_iflag = r;
|
|
|
|
|
|
|
|
l = bt->c_oflag; r = 0;
|
|
|
|
if (l & OPOST) r |= IBCS2_OPOST;
|
|
|
|
if (l & ONLCR) r |= IBCS2_ONLCR;
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
|
|
|
if (l & TAB3) r |= IBCS2_TAB3;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
st->c_oflag = r;
|
|
|
|
|
|
|
|
l = bt->c_cflag; r = 0;
|
|
|
|
switch (l & CSIZE) {
|
|
|
|
case CS5: r |= IBCS2_CS5; break;
|
|
|
|
case CS6: r |= IBCS2_CS6; break;
|
|
|
|
case CS7: r |= IBCS2_CS7; break;
|
|
|
|
case CS8: r |= IBCS2_CS8; break;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
if (l & CSTOPB) r |= IBCS2_CSTOPB;
|
|
|
|
if (l & CREAD) r |= IBCS2_CREAD;
|
|
|
|
if (l & PARENB) r |= IBCS2_PARENB;
|
|
|
|
if (l & PARODD) r |= IBCS2_PARODD;
|
|
|
|
if (l & HUPCL) r |= IBCS2_HUPCL;
|
|
|
|
if (l & CLOCAL) r |= IBCS2_CLOCAL;
|
|
|
|
st->c_cflag = r;
|
|
|
|
|
|
|
|
l = bt->c_lflag; r = 0;
|
|
|
|
if (l & ISIG) r |= IBCS2_ISIG;
|
|
|
|
if (l & ICANON) r |= IBCS2_ICANON;
|
|
|
|
if (l & ECHO) r |= IBCS2_ECHO;
|
|
|
|
if (l & ECHOE) r |= IBCS2_ECHOE;
|
|
|
|
if (l & ECHOK) r |= IBCS2_ECHOK;
|
|
|
|
if (l & ECHONL) r |= IBCS2_ECHONL;
|
|
|
|
if (l & NOFLSH) r |= IBCS2_NOFLSH;
|
|
|
|
if (l & TOSTOP) r |= IBCS2_TOSTOP;
|
|
|
|
st->c_lflag = r;
|
|
|
|
|
|
|
|
l = ttspeedtab(bt->c_ospeed, sptab);
|
|
|
|
if ((int)l >= 0)
|
|
|
|
st->c_cflag |= l;
|
|
|
|
|
|
|
|
st->c_cc[IBCS2_VINTR] =
|
|
|
|
bt->c_cc[VINTR] != _POSIX_VDISABLE ? bt->c_cc[VINTR] : 0;
|
|
|
|
st->c_cc[IBCS2_VQUIT] =
|
|
|
|
bt->c_cc[VQUIT] != _POSIX_VDISABLE ? bt->c_cc[VQUIT] : 0;
|
|
|
|
st->c_cc[IBCS2_VERASE] =
|
|
|
|
bt->c_cc[VERASE] != _POSIX_VDISABLE ? bt->c_cc[VERASE] : 0;
|
|
|
|
st->c_cc[IBCS2_VKILL] =
|
|
|
|
bt->c_cc[VKILL] != _POSIX_VDISABLE ? bt->c_cc[VKILL] : 0;
|
1996-03-28 19:53:21 +00:00
|
|
|
if (bt->c_lflag & ICANON) {
|
|
|
|
st->c_cc[IBCS2_VEOF] =
|
|
|
|
bt->c_cc[VEOF] != _POSIX_VDISABLE ? bt->c_cc[VEOF] : 0;
|
|
|
|
st->c_cc[IBCS2_VEOL] =
|
|
|
|
bt->c_cc[VEOL] != _POSIX_VDISABLE ? bt->c_cc[VEOL] : 0;
|
|
|
|
} else {
|
|
|
|
st->c_cc[IBCS2_VMIN] = bt->c_cc[VMIN];
|
|
|
|
st->c_cc[IBCS2_VTIME] = bt->c_cc[VTIME];
|
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
st->c_cc[IBCS2_VEOL2] =
|
|
|
|
bt->c_cc[VEOL2] != _POSIX_VDISABLE ? bt->c_cc[VEOL2] : 0;
|
|
|
|
st->c_cc[IBCS2_VSWTCH] =
|
|
|
|
0;
|
|
|
|
st->c_cc[IBCS2_VSUSP] =
|
|
|
|
bt->c_cc[VSUSP] != _POSIX_VDISABLE ? bt->c_cc[VSUSP] : 0;
|
|
|
|
st->c_cc[IBCS2_VSTART] =
|
|
|
|
bt->c_cc[VSTART] != _POSIX_VDISABLE ? bt->c_cc[VSTART] : 0;
|
|
|
|
st->c_cc[IBCS2_VSTOP] =
|
|
|
|
bt->c_cc[VSTOP] != _POSIX_VDISABLE ? bt->c_cc[VSTOP] : 0;
|
|
|
|
|
|
|
|
st->c_line = 0;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stios2stio(ts, t)
|
|
|
|
struct ibcs2_termios *ts;
|
|
|
|
struct ibcs2_termio *t;
|
1994-10-14 08:53:16 +00:00
|
|
|
{
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
t->c_iflag = ts->c_iflag;
|
|
|
|
t->c_oflag = ts->c_oflag;
|
|
|
|
t->c_cflag = ts->c_cflag;
|
|
|
|
t->c_lflag = ts->c_lflag;
|
|
|
|
t->c_line = ts->c_line;
|
|
|
|
bcopy(ts->c_cc, t->c_cc, IBCS2_NCC);
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stio2stios(t, ts)
|
|
|
|
struct ibcs2_termio *t;
|
|
|
|
struct ibcs2_termios *ts;
|
1994-10-14 08:53:16 +00:00
|
|
|
{
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
ts->c_iflag = t->c_iflag;
|
|
|
|
ts->c_oflag = t->c_oflag;
|
|
|
|
ts->c_cflag = t->c_cflag;
|
|
|
|
ts->c_lflag = t->c_lflag;
|
|
|
|
ts->c_line = t->c_line;
|
|
|
|
bcopy(t->c_cc, ts->c_cc, IBCS2_NCC);
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2001-09-12 08:38:13 +00:00
|
|
|
ibcs2_ioctl(td, uap)
|
|
|
|
struct thread *td;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
struct ibcs2_ioctl_args *uap;
|
1994-10-14 08:53:16 +00:00
|
|
|
{
|
2001-09-12 08:38:13 +00:00
|
|
|
struct proc *p = td->td_proc;
|
1994-10-14 08:53:16 +00:00
|
|
|
struct file *fp;
|
|
|
|
int error;
|
|
|
|
|
2011-08-11 12:30:23 +00:00
|
|
|
if ((error = fget(td, uap->fd, CAP_IOCTL, &fp)) != 0) {
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
DPRINTF(("ibcs2_ioctl(%d): bad fd %d ", p->p_pid,
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->fd));
|
1994-10-14 08:53:16 +00:00
|
|
|
return EBADF;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
1994-10-14 08:53:16 +00:00
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
if ((fp->f_flag & (FREAD|FWRITE)) == 0) {
|
2002-01-13 11:58:06 +00:00
|
|
|
fdrop(fp, td);
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
DPRINTF(("ibcs2_ioctl(%d): bad fp flag ", p->p_pid));
|
1994-10-14 08:53:16 +00:00
|
|
|
return EBADF;
|
|
|
|
}
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
switch (uap->cmd) {
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
case IBCS2_TCGETA:
|
|
|
|
case IBCS2_XCGETA:
|
|
|
|
case IBCS2_OXCGETA:
|
|
|
|
{
|
|
|
|
struct termios bts;
|
|
|
|
struct ibcs2_termios sts;
|
|
|
|
struct ibcs2_termio st;
|
|
|
|
|
2002-08-17 02:36:16 +00:00
|
|
|
if ((error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bts,
|
|
|
|
td->td_ucred, td)) != 0)
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
btios2stios (&bts, &sts);
|
2002-12-14 01:56:26 +00:00
|
|
|
if (uap->cmd == IBCS2_TCGETA) {
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stios2stio (&sts, &st);
|
2002-12-14 01:56:26 +00:00
|
|
|
error = copyout((caddr_t)&st, uap->data,
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
sizeof (st));
|
|
|
|
#ifdef DEBUG_IBCS2
|
|
|
|
if (error)
|
|
|
|
DPRINTF(("ibcs2_ioctl(%d): copyout failed ",
|
|
|
|
p->p_pid));
|
1994-10-14 08:53:16 +00:00
|
|
|
#endif
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
|
|
|
} else {
|
2002-12-14 01:56:26 +00:00
|
|
|
error = copyout((caddr_t)&sts, uap->data,
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
sizeof (sts));
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
/*NOTREACHED*/
|
|
|
|
}
|
|
|
|
|
|
|
|
case IBCS2_TCSETA:
|
|
|
|
case IBCS2_TCSETAW:
|
|
|
|
case IBCS2_TCSETAF:
|
|
|
|
{
|
|
|
|
struct termios bts;
|
|
|
|
struct ibcs2_termios sts;
|
|
|
|
struct ibcs2_termio st;
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
if ((error = copyin(uap->data, (caddr_t)&st,
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
sizeof(st))) != 0) {
|
|
|
|
DPRINTF(("ibcs2_ioctl(%d): TCSET copyin failed ",
|
|
|
|
p->p_pid));
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|
1995-05-30 08:16:23 +00:00
|
|
|
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
/* get full BSD termios so we don't lose information */
|
2002-08-17 02:36:16 +00:00
|
|
|
if ((error = fo_ioctl(fp, TIOCGETA, (caddr_t)&bts,
|
|
|
|
td->td_ucred, td)) != 0) {
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
DPRINTF(("ibcs2_ioctl(%d): TCSET ctl failed fd %d ",
|
2002-12-14 01:56:26 +00:00
|
|
|
p->p_pid, uap->fd));
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1994-10-17 22:13:10 +00:00
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* convert to iBCS2 termios, copy in information from
|
|
|
|
* termio, and convert back, then set new values.
|
|
|
|
*/
|
|
|
|
btios2stios(&bts, &sts);
|
|
|
|
stio2stios(&st, &sts);
|
|
|
|
stios2btios(&sts, &bts);
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
error = fo_ioctl(fp, uap->cmd - IBCS2_TCSETA + TIOCSETA,
|
2002-08-17 02:36:16 +00:00
|
|
|
(caddr_t)&bts, td->td_ucred, td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case IBCS2_XCSETA:
|
|
|
|
case IBCS2_XCSETAW:
|
|
|
|
case IBCS2_XCSETAF:
|
|
|
|
{
|
|
|
|
struct termios bts;
|
|
|
|
struct ibcs2_termios sts;
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
if ((error = copyin(uap->data, (caddr_t)&sts,
|
2002-01-13 11:58:06 +00:00
|
|
|
sizeof (sts))) != 0)
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stios2btios (&sts, &bts);
|
2002-12-14 01:56:26 +00:00
|
|
|
error = fo_ioctl(fp, uap->cmd - IBCS2_XCSETA + TIOCSETA,
|
2002-08-17 02:36:16 +00:00
|
|
|
(caddr_t)&bts, td->td_ucred, td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case IBCS2_OXCSETA:
|
|
|
|
case IBCS2_OXCSETAW:
|
|
|
|
case IBCS2_OXCSETAF:
|
|
|
|
{
|
|
|
|
struct termios bts;
|
|
|
|
struct ibcs2_termios sts;
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
if ((error = copyin(uap->data, (caddr_t)&sts,
|
2002-01-13 11:58:06 +00:00
|
|
|
sizeof (sts))) != 0)
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
stios2btios (&sts, &bts);
|
2002-12-14 01:56:26 +00:00
|
|
|
error = fo_ioctl(fp, uap->cmd - IBCS2_OXCSETA + TIOCSETA,
|
2002-08-17 02:36:16 +00:00
|
|
|
(caddr_t)&bts, td->td_ucred, td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case IBCS2_TCSBRK:
|
|
|
|
DPRINTF(("ibcs2_ioctl(%d): TCSBRK ", p->p_pid));
|
2002-01-13 11:58:06 +00:00
|
|
|
error = ENOSYS;
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TCXONC:
|
1996-03-28 19:53:21 +00:00
|
|
|
{
|
2002-12-14 01:56:26 +00:00
|
|
|
switch ((int)uap->data) {
|
1996-03-28 19:53:21 +00:00
|
|
|
case 0:
|
|
|
|
case 1:
|
|
|
|
DPRINTF(("ibcs2_ioctl(%d): TCXONC ", p->p_pid));
|
2002-01-13 11:58:06 +00:00
|
|
|
error = ENOSYS;
|
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
case 2:
|
2002-08-17 02:36:16 +00:00
|
|
|
error = fo_ioctl(fp, TIOCSTOP, (caddr_t)0,
|
|
|
|
td->td_ucred, td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
case 3:
|
2002-08-17 02:36:16 +00:00
|
|
|
error = fo_ioctl(fp, TIOCSTART, (caddr_t)1,
|
|
|
|
td->td_ucred, td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
default:
|
2002-01-13 11:58:06 +00:00
|
|
|
error = EINVAL;
|
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
}
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TCFLSH:
|
1996-03-28 19:53:21 +00:00
|
|
|
{
|
|
|
|
int arg;
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
switch ((int)uap->data) {
|
1996-03-28 19:53:21 +00:00
|
|
|
case 0:
|
|
|
|
arg = FREAD;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
arg = FWRITE;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
arg = FREAD | FWRITE;
|
|
|
|
break;
|
|
|
|
default:
|
2002-01-13 11:58:06 +00:00
|
|
|
fdrop(fp, td);
|
1996-03-28 19:53:21 +00:00
|
|
|
return EINVAL;
|
|
|
|
}
|
2002-08-17 02:36:16 +00:00
|
|
|
error = fo_ioctl(fp, TIOCFLUSH, (caddr_t)&arg, td->td_ucred,
|
|
|
|
td);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
1996-03-28 19:53:21 +00:00
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TIOCGWINSZ:
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = TIOCGWINSZ;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TIOCSWINSZ:
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = TIOCSWINSZ;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TIOCGPGRP:
|
2002-01-13 11:58:06 +00:00
|
|
|
{
|
|
|
|
pid_t pg_id;
|
|
|
|
|
2001-01-23 23:59:38 +00:00
|
|
|
PROC_LOCK(p);
|
2002-01-13 11:58:06 +00:00
|
|
|
pg_id = p->p_pgrp->pg_id;
|
2001-01-23 23:59:38 +00:00
|
|
|
PROC_UNLOCK(p);
|
2002-12-14 01:56:26 +00:00
|
|
|
error = copyout((caddr_t)&pg_id, uap->data,
|
2002-01-13 11:58:06 +00:00
|
|
|
sizeof(pg_id));
|
|
|
|
break;
|
|
|
|
}
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TIOCSPGRP: /* XXX - is uap->data a pointer to pgid? */
|
|
|
|
{
|
|
|
|
struct setpgid_args sa;
|
|
|
|
|
2002-12-14 01:56:26 +00:00
|
|
|
sa.pid = 0;
|
|
|
|
sa.pgid = (int)uap->data;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_setpgid(td, &sa);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case IBCS2_TCGETSC: /* SCO console - get scancode flags */
|
2002-01-13 11:58:06 +00:00
|
|
|
error = EINTR; /* ENOSYS; */
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_TCSETSC: /* SCO console - set scancode flags */
|
2002-01-13 11:58:06 +00:00
|
|
|
error = 0; /* ENOSYS; */
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_JWINSIZE: /* Unix to Jerq I/O control */
|
|
|
|
{
|
|
|
|
struct ibcs2_jwinsize {
|
|
|
|
char bytex, bytey;
|
|
|
|
short bitx, bity;
|
|
|
|
} ibcs2_jwinsize;
|
|
|
|
|
2001-01-23 23:59:38 +00:00
|
|
|
PROC_LOCK(p);
|
2002-02-23 11:12:57 +00:00
|
|
|
SESS_LOCK(p->p_session);
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
ibcs2_jwinsize.bytex = 80;
|
|
|
|
/* p->p_session->s_ttyp->t_winsize.ws_col; XXX */
|
|
|
|
ibcs2_jwinsize.bytey = 25;
|
|
|
|
/* p->p_session->s_ttyp->t_winsize.ws_row; XXX */
|
|
|
|
ibcs2_jwinsize.bitx =
|
|
|
|
p->p_session->s_ttyp->t_winsize.ws_xpixel;
|
|
|
|
ibcs2_jwinsize.bity =
|
|
|
|
p->p_session->s_ttyp->t_winsize.ws_ypixel;
|
2002-02-23 11:12:57 +00:00
|
|
|
SESS_UNLOCK(p->p_session);
|
2001-01-23 23:59:38 +00:00
|
|
|
PROC_UNLOCK(p);
|
2002-12-14 01:56:26 +00:00
|
|
|
error = copyout((caddr_t)&ibcs2_jwinsize, uap->data,
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
sizeof(ibcs2_jwinsize));
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* keyboard and display ioctl's -- type 'K' */
|
|
|
|
case IBCS2_KDGKBMODE: /* get keyboard translation mode */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDGKBMODE;
|
|
|
|
/* printf("ioctl KDGKBMODE = %x\n", uap->cmd);*/
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDSKBMODE: /* set keyboard translation mode */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDSKBMODE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDMKTONE: /* sound tone */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDMKTONE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDGETMODE: /* get text/graphics mode */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDGETMODE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDSETMODE: /* set text/graphics mode */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDSETMODE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDSBORDER: /* set ega color border */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDSBORDER;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDGKBSTATE:
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDGKBSTATE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDSETRAD:
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDSETRAD;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDENABIO: /* enable direct I/O to ports */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDENABIO;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDDISABIO: /* disable direct I/O to ports */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDDISABIO;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KIOCSOUND: /* start sound generation */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KIOCSOUND;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDGKBTYPE: /* get keyboard type */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDGKBTYPE;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDGETLED: /* get keyboard LED status */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDGETLED;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_KDSETLED: /* set keyboard LED status */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = KDSETLED;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
/* Xenix keyboard and display ioctl's from sys/kd.h -- type 'k' */
|
|
|
|
case IBCS2_GETFKEY: /* Get function key */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = GETFKEY;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_SETFKEY: /* Set function key */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = SETFKEY;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_GIO_SCRNMAP: /* Get screen output map table */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = GIO_SCRNMAP;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_PIO_SCRNMAP: /* Set screen output map table */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = PIO_SCRNMAP;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_GIO_KEYMAP: /* Get keyboard map table */
|
2011-07-17 08:19:19 +00:00
|
|
|
uap->cmd = OGIO_KEYMAP;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
case IBCS2_PIO_KEYMAP: /* Set keyboard map table */
|
2011-07-17 08:19:19 +00:00
|
|
|
uap->cmd = OPIO_KEYMAP;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
/* socksys */
|
|
|
|
case IBCS2_SIOCSOCKSYS:
|
2002-01-13 11:58:06 +00:00
|
|
|
error = ibcs2_socksys(td, (struct ibcs2_socksys_args *)uap);
|
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
2001-11-16 20:32:32 +00:00
|
|
|
case IBCS2_FIONREAD:
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
case IBCS2_I_NREAD: /* STREAMS */
|
2002-12-14 01:56:26 +00:00
|
|
|
uap->cmd = FIONREAD;
|
2011-09-16 13:58:51 +00:00
|
|
|
error = sys_ioctl(td, (struct ioctl_args *)uap);
|
2002-01-13 11:58:06 +00:00
|
|
|
break;
|
Remove old files no longer needed.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
1995-10-10 07:59:30 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
DPRINTF(("ibcs2_ioctl(%d): unknown cmd 0x%lx ",
|
2002-12-14 01:56:26 +00:00
|
|
|
td->proc->p_pid, uap->cmd));
|
2002-01-13 11:58:06 +00:00
|
|
|
error = ENOSYS;
|
|
|
|
break;
|
1994-10-17 22:13:10 +00:00
|
|
|
}
|
2002-01-13 11:58:06 +00:00
|
|
|
|
|
|
|
fdrop(fp, td);
|
|
|
|
return error;
|
1994-10-14 08:53:16 +00:00
|
|
|
}
|