summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-07-17 08:24:57 +0000
committermarcel <marcel@FreeBSD.org>1999-07-17 08:24:57 +0000
commit53c130ee843d954d6f690233a9c285c00393017f (patch)
treecb7cc4b694f9aa96aa91203cf82bb3cf02d27cdf /sys/compat
parent3e4c2ad4a22086967d58cae4d866a37ab55b495a (diff)
downloadFreeBSD-src-53c130ee843d954d6f690233a9c285c00393017f.zip
FreeBSD-src-53c130ee843d954d6f690233a9c285c00393017f.tar.gz
Implementation of TCXONC.
Reviewed by: bde
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ioctl.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 18b1247..1c79c6c 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_ioctl.c,v 1.34 1999/07/06 11:41:48 marcel Exp $
+ * $Id: linux_ioctl.c,v 1.35 1999/07/08 16:15:19 marcel Exp $
*/
#include <sys/param.h>
@@ -986,6 +986,37 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args)
linux_tiocsserial(fp, (struct linux_serial_struct *)args->arg);
return 0;
+ case LINUX_TCXONC:
+ switch (args->arg) {
+ case LINUX_TCOOFF:
+ args->cmd = TIOCSTOP;
+ break;
+ case LINUX_TCOON:
+ args->cmd = TIOCSTART;
+ break;
+ case LINUX_TCIOFF:
+ case LINUX_TCION: {
+ u_char c;
+ struct write_args wr;
+ error = (*func)(fp, TIOCGETA, (caddr_t)&bsd_termios, p);
+ if (error != 0)
+ return error;
+ c = bsd_termios.c_cc[args->arg == LINUX_TCIOFF ? VSTOP : VSTART];
+ if (c != _POSIX_VDISABLE) {
+ wr.fd = args->fd;
+ wr.buf = &c;
+ wr.nbyte = sizeof(c);
+ return write(p, &wr);
+ }
+ else
+ return (0);
+ }
+ default:
+ return EINVAL;
+ }
+ args->arg = 0;
+ return ioctl(p, (struct ioctl_args *)args);
+
case LINUX_TCFLSH:
args->cmd = TIOCFLUSH;
switch (args->arg) {
OpenPOWER on IntegriCloud