drop <minix/termios.h>, use clean <sys/termios.h>

. also implement some netbsd-style tty ioctls
	. also implement SIGINFO
	. also import netbsd stty
	. rename keymap minix CMIN (for ctrl+minus on numeric keypad)
	  to CNMIN; to keep unchanged control character default CMIN in
	  new <sys/ttydefaults.h>
	. convert CS[5678] logic in rs232 driver to explicit setting of LC
	  bits

Change-Id: I9b7d2963fe9aec00fb6e7535ef565b3191fc1c1d
This commit is contained in:
Ben Gras
2014-03-02 12:28:20 +01:00
committed by sambuc
parent a06e2ab395
commit 7120f34ec1
69 changed files with 2734 additions and 2006 deletions
-5
View File
@@ -53,10 +53,6 @@ __weak_alias(tcflow,_tcflow)
int
tcflow(int fd, int action)
{
#ifdef __minix
_DIAGASSERT(fd != -1);
return ioctl(fd, TCFLOW, &action);
#else /* !__minix */
struct termios term;
u_char c;
@@ -80,5 +76,4 @@ tcflow(int fd, int action)
return (-1);
}
/* NOTREACHED */
#endif /* !__minix */
}
-5
View File
@@ -53,10 +53,6 @@ __weak_alias(tcflush,_tcflush)
int
tcflush(int fd, int which)
{
#ifdef __minix
_DIAGASSERT(fd != -1);
return ioctl(fd, TCFLSH, &which);
#else /* !__minix */
int com;
_DIAGASSERT(fd != -1);
@@ -76,5 +72,4 @@ tcflush(int fd, int which)
return (-1);
}
return (ioctl(fd, TIOCFLUSH, &com));
#endif /* !__minix */
}
+4 -8
View File
@@ -40,10 +40,11 @@ __RCSID("$NetBSD: tcsendbreak.c,v 1.10 2012/06/25 22:32:46 abs Exp $");
#include "namespace.h"
#include <sys/types.h>
#include <sys/ioctl.h>
#ifndef __minix
#ifdef __minix
#include <sys/time.h>
#endif /* !__minix */
#endif
#include <sys/types.h>
#include <sys/ioctl.h>
#include <assert.h>
#include <errno.h>
@@ -58,10 +59,6 @@ __weak_alias(tcsendbreak,_tcsendbreak)
int
tcsendbreak(int fd, int len)
{
#ifdef __minix
_DIAGASSERT(fd != -1);
return ioctl(fd, TCSBRK, &len);
#else /* !__minix */
static const struct timespec sleepytime = { 0, 400000000 };
_DIAGASSERT(fd != -1);
@@ -72,5 +69,4 @@ tcsendbreak(int fd, int len)
if (ioctl(fd, TIOCCBRK, 0) == -1)
return (-1);
return (0);
#endif /* !__minix */
}
-6
View File
@@ -53,22 +53,16 @@ __weak_alias(tcsetattr,_tcsetattr)
int
tcsetattr(int fd, int opt, const struct termios *t)
{
#ifndef __minix
struct termios localterm;
#endif
_DIAGASSERT(fd != -1);
_DIAGASSERT(t != NULL);
#ifndef __minix
if (opt & TCSASOFT) {
localterm = *t;
localterm.c_cflag |= CIGNORE;
t = &localterm;
}
#else /* __minix */
#define TCSASOFT 0
#endif /* __minix */
switch (opt & ~TCSASOFT) {
case TCSANOW:
return (ioctl(fd, TIOCSETA, __UNCONST(t)));