diff options
29 files changed, 522 insertions, 406 deletions
diff --git a/usr/src/cmd/bnu/line.c b/usr/src/cmd/bnu/line.c index d3992cc0e1..283c720a9b 100644 --- a/usr/src/cmd/bnu/line.c +++ b/usr/src/cmd/bnu/line.c @@ -35,40 +35,41 @@ #include "uucp.h" static struct sg_spds { - int sp_val, - sp_name; + int sp_val; + int sp_name; } spds[] = { - { 50, B50}, - { 75, B75}, - { 110, B110}, - { 134, B134}, - { 150, B150}, - { 200, B200}, - { 300, B300}, - { 600, B600}, - {1200, B1200}, - {1800, B1800}, - {2400, B2400}, - {4800, B4800}, - {9600, B9600}, -#ifdef EXTA - {19200, EXTA}, -#endif -#ifdef B19200 - {19200, B19200}, -#endif -#ifdef B38400 - {38400, B38400}, -#endif - {57600, B57600}, - {76800, B76800}, - {115200, B115200}, - {153600, B153600}, - {230400, B230400}, - {307200, B307200}, - {460800, B460800}, - {921600, B921600}, - {0, 0} + { 50, B50 }, + { 75, B75 }, + { 110, B110 }, + { 134, B134 }, + { 150, B150 }, + { 200, B200 }, + { 300, B300 }, + { 600, B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, + { 4800, B4800 }, + { 9600, B9600 }, + { 19200, B19200 }, + { 38400, B38400 }, + { 57600, B57600 }, + { 76800, B76800 }, + { 115200, B115200 }, + { 153600, B153600 }, + { 230400, B230400 }, + { 307200, B307200 }, + { 460800, B460800 }, + { 921600, B921600 }, + { 1000000, B1000000 }, + { 1152000, B1152000 }, + { 1500000, B1500000 }, + { 2000000, B2000000 }, + { 2500000, B2500000 }, + { 3000000, B3000000 }, + { 3500000, B3500000 }, + { 4000000, B4000000 }, + { 0, 0} }; #define PACKSIZE 64 diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c b/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c index e7fcb8fae8..b5f277315b 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/sys-solaris.c @@ -1123,92 +1123,39 @@ clean_check() struct speed { int speed_int; int speed_val; -} speeds [] = { -#ifdef B50 - { 50, B50 }, -#endif -#ifdef B75 - { 75, B75 }, -#endif -#ifdef B110 - { 110, B110 }, -#endif -#ifdef B134 - { 134, B134 }, -#endif -#ifdef B150 - { 150, B150 }, -#endif -#ifdef B200 - { 200, B200 }, -#endif -#ifdef B300 - { 300, B300 }, -#endif -#ifdef B600 - { 600, B600 }, -#endif -#ifdef B1200 - { 1200, B1200 }, -#endif -#ifdef B1800 - { 1800, B1800 }, -#endif -#ifdef B2000 - { 2000, B2000 }, -#endif -#ifdef B2400 - { 2400, B2400 }, -#endif -#ifdef B3600 - { 3600, B3600 }, -#endif -#ifdef B4800 - { 4800, B4800 }, -#endif -#ifdef B7200 - { 7200, B7200 }, -#endif -#ifdef B9600 - { 9600, B9600 }, -#endif -#ifdef B19200 - { 19200, B19200 }, -#endif -#ifdef B38400 - { 38400, B38400 }, -#endif -#ifdef EXTA - { 19200, EXTA }, -#endif -#ifdef EXTB - { 38400, EXTB }, -#endif -#ifdef B57600 - { 57600, B57600 }, -#endif -#ifdef B76800 - { 76800, B76800 }, -#endif -#ifdef B115200 - { 115200, B115200 }, -#endif -#ifdef B153600 - { 153600, B153600 }, -#endif -#ifdef B230400 - { 230400, B230400 }, -#endif -#ifdef B307200 - { 307200, B307200 }, -#endif -#ifdef B460800 - { 460800, B460800 }, -#endif -#ifdef B921600 - { 921600, B921600 }, -#endif - { 0, 0 } +} speeds[] = { + { 50, B50 }, + { 75, B75 }, + { 110, B110 }, + { 134, B134 }, + { 150, B150 }, + { 200, B200 }, + { 300, B300 }, + { 600, B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, + { 4800, B4800 }, + { 9600, B9600 }, + { 19200, B19200 }, + { 38400, B38400 }, + { 57600, B57600 }, + { 76800, B76800 }, + { 115200, B115200 }, + { 153600, B153600 }, + { 230400, B230400 }, + { 307200, B307200 }, + { 460800, B460800 }, + { 921600, B921600 }, + { 1000000, B1000000 }, + { 1152000, B1152000 }, + { 1500000, B1500000 }, + { 2000000, B2000000 }, + { 2500000, B2500000 }, + { 3000000, B3000000 }, + { 3500000, B3500000 }, + { 4000000, B4000000 }, + { 0, 0 } }; /* diff --git a/usr/src/cmd/cmd-inet/usr.bin/telnet/sys_bsd.c b/usr/src/cmd/cmd-inet/usr.bin/telnet/sys_bsd.c index 37ed50645b..5bcd1a3c2e 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/telnet/sys_bsd.c +++ b/usr/src/cmd/cmd-inet/usr.bin/telnet/sys_bsd.c @@ -37,10 +37,6 @@ * */ -#ifndef lint -static char sccsid[] = "@(#)sys_bsd.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ - /* * The following routines try to encapsulate what is system dependent * (at least between 4.x and dos) which is used in telnet.c. @@ -553,15 +549,17 @@ static struct termspeeds { int speed; int value; } termspeeds[] = { - { 0, B0 }, { 50, B50 }, { 75, B75 }, - { 110, B110 }, { 134, B134 }, { 150, B150 }, - { 200, B200 }, { 300, B300 }, { 600, B600 }, - { 1200, B1200 }, { 1800, B1800 }, { 2400, B2400 }, - { 4800, B4800 }, { 9600, B9600 }, { 19200, B19200 }, + { 0, B0 }, { 50, B50 }, { 75, B75 }, + { 110, B110 }, { 134, B134 }, { 150, B150 }, + { 200, B200 }, { 300, B300 }, { 600, B600 }, + { 1200, B1200 }, { 1800, B1800 }, { 2400, B2400 }, + { 4800, B4800 }, { 9600, B9600 }, { 19200, B19200 }, { 38400, B38400 }, { 57600, B57600 }, { 76800, B76800 }, { 115200, B115200 }, { 153600, B153600 }, { 230400, B230400 }, { 307200, B307200 }, { 460800, B460800 }, { 921600, B921600 }, - { -1, B0 } + { 1000000, B1000000 }, { 1152000, B1152000 }, { 1500000, B1500000 }, + { 2000000, B2000000 }, { 2500000, B2500000 }, { 3000000, B3000000 }, + { 3500000, B3500000 }, { 4000000, B4000000 }, { -1, B0 } }; void diff --git a/usr/src/cmd/login/login.c b/usr/src/cmd/login/login.c index 03ad4e72ea..7e72ab03ea 100644 --- a/usr/src/cmd/login/login.c +++ b/usr/src/cmd/login/login.c @@ -1539,7 +1539,8 @@ static char *speeds[] = { "0", "50", "75", "110", "134", "150", "200", "300", "600", "1200", "1800", "2400", "4800", "9600", "19200", "38400", "57600", "76800", "115200", "153600", "230400", "307200", "460800", - "921600" + "921600", "1000000", "1152000", "1500000", "2000000", "2500000", + "3000000", "3500000", "4000000" }; #define NSPEEDS (sizeof (speeds) / sizeof (speeds[0])) @@ -1562,11 +1563,12 @@ doremoteterm(char *term) if (cp) *cp++ = '\0'; - for (cpp = speeds; cpp < &speeds[NSPEEDS]; cpp++) + for (cpp = speeds; cpp < &speeds[NSPEEDS]; cpp++) { if (strcmp(*cpp, speed) == 0) { (void) cfsetospeed(&tp, cpp-speeds); break; } + } } tp.c_lflag |= ECHO|ICANON; diff --git a/usr/src/cmd/lp/cmd/lpsched/ports.c b/usr/src/cmd/lp/cmd/lpsched/ports.c index e82198d02d..e31944729b 100644 --- a/usr/src/cmd/lp/cmd/lpsched/ports.c +++ b/usr/src/cmd/lp/cmd/lpsched/ports.c @@ -73,7 +73,15 @@ open_dialup(char *ptype, PRINTER *pp) "230400", "307200", "460800", - "921600" + "921600", + "1000000", + "1152000", + "1500000", + "2000000", + "2500000", + "3000000", + "3500000", + "4000000" }; struct termio tio; diff --git a/usr/src/cmd/lp/filter/postscript/postio/postio.h b/usr/src/cmd/lp/filter/postscript/postio/postio.h index d9dbb7ccce..5575576bb2 100644 --- a/usr/src/cmd/lp/filter/postscript/postio/postio.h +++ b/usr/src/cmd/lp/filter/postscript/postio/postio.h @@ -233,6 +233,14 @@ typedef struct { "460.8", B460800, \ "921600", B921600, \ "921.6", B921600, \ + "1000000", B1000000, \ + "1152000", B1152000, \ + "1500000", B1500000, \ + "2000000", B2000000, \ + "2500000", B2500000, \ + "3000000", B3000000, \ + "3500000", B3500000, \ + "4000000", B4000000, \ NULL, B9600 \ } diff --git a/usr/src/cmd/lp/model/lp.cat.c b/usr/src/cmd/lp/model/lp.cat.c index 29f14ad318..1b94b0afd8 100644 --- a/usr/src/cmd/lp/model/lp.cat.c +++ b/usr/src/cmd/lp/model/lp.cat.c @@ -673,11 +673,12 @@ sigterm() * baudrate() - RETURN BAUD RATE OF OUTPUT LINE */ -static int baud_convert[] = -{ - 0, 50, 75, 110, 135, 150, 200, 300, 600, 1200, +static int baud_convert[] = { + 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, - 76800, 115200, 153600, 230400, 307200, 460800, 921600 + 76800, 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, + 3500000, 4000000 }; int @@ -688,12 +689,14 @@ baudrate() int speed; if (ioctl(1, TCGETS, &tms) < 0) { - if (ioctl(1, TCGETA, &tm) < 0) + if (ioctl(1, TCGETA, &tm) < 0) { return (1200); - else + } else { speed = tm.c_cflag&CBAUD; - } else + } + } else { speed = cfgetospeed(&tms); + } return (speed ? baud_convert[speed] : 1200); } diff --git a/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c b/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c index 8200325c0c..42dae65d72 100644 --- a/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c +++ b/usr/src/cmd/mdb/common/kmdb/kmdb_promif.c @@ -430,7 +430,9 @@ kmdb_parse_mode(const char *mode, struct termios *tip, int in) static const uint_t baudmap[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, - 76800, 115200, 153600, 230400, 307200, 460800, 921600 + 76800, 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, + 3500000, 4000000 }; static const uint_t bitsmap[] = { CS6, CS6, CS7, CS8 }; char *m = strdup(mode); diff --git a/usr/src/cmd/mdb/common/mdb/mdb_termio.c b/usr/src/cmd/mdb/common/mdb/mdb_termio.c index 825b7b38ec..f1d0f55654 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_termio.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_termio.c @@ -753,7 +753,9 @@ termio_resume_tty(termio_data_t *td, struct termios *iosp) static const uint_t baud[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, - 76800, 115200, 153600, 230400, 307200, 460800, 921600 + 76800, 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, + 3500000, 4000000 }; struct termios *ntios; diff --git a/usr/src/cmd/tip/tip.c b/usr/src/cmd/tip/tip.c index c18a51ba79..b6dbf3937c 100644 --- a/usr/src/cmd/tip/tip.c +++ b/usr/src/cmd/tip/tip.c @@ -30,7 +30,8 @@ int bauds[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200, - 460800, 921600, -1 + 460800, 921600, 1000000, 1152000, 1500000, + 2000000, 2500000, 3000000, 3500000, 4000000, -1 }; extern void tipout(void) __NORETURN; diff --git a/usr/src/cmd/tput/tput.c b/usr/src/cmd/tput/tput.c index c8a61cc2ee..83018e164f 100644 --- a/usr/src/cmd/tput/tput.c +++ b/usr/src/cmd/tput/tput.c @@ -292,31 +292,39 @@ struct delay /* The appropriate speeds for various termio settings. */ static int speeds[] = { - 0, /* B0, */ - 50, /* B50, */ - 75, /* B75, */ - 110, /* B110, */ - 134, /* B134, */ - 150, /* B150, */ - 200, /* B200, */ - 300, /* B300, */ - 600, /* B600, */ - 1200, /* B1200, */ - 1800, /* B1800, */ - 2400, /* B2400, */ - 4800, /* B4800, */ - 9600, /* B9600, */ - 19200, /* EXTA, */ - 38400, /* EXTB, */ - 57600, /* B57600, */ - 76800, /* B76800, */ - 115200, /* B115200, */ - 153600, /* B153600, */ - 230400, /* B230400, */ - 307200, /* B307200, */ - 460800, /* B460800, */ - 921600, /* B921600, */ - 0, + 0, /* B0 */ + 50, /* B50 */ + 75, /* B75 */ + 110, /* B110 */ + 134, /* B134 */ + 150, /* B150 */ + 200, /* B200 */ + 300, /* B300 */ + 600, /* B600 */ + 1200, /* B1200 */ + 1800, /* B1800 */ + 2400, /* B2400 */ + 4800, /* B4800 */ + 9600, /* B9600 */ + 19200, /* B19200 */ + 38400, /* B38400 */ + 57600, /* B57600 */ + 76800, /* B76800 */ + 115200, /* B115200 */ + 153600, /* B153600 */ + 230400, /* B230400 */ + 307200, /* B307200 */ + 460800, /* B460800 */ + 921600, /* B921600 */ + 1000000, /* B1000000 */ + 1152000, /* B1152000 */ + 1500000, /* B1500000 */ + 2000000, /* B2000000 */ + 2500000, /* B2500000 */ + 3000000, /* B3000000 */ + 3500000, /* B3500000 */ + 4000000, /* B4000000 */ + 0 }; #if defined(SYSV) || defined(USG) diff --git a/usr/src/cmd/ttymon/sttytable.c b/usr/src/cmd/ttymon/sttytable.c index aca71657c1..71c18d32f6 100644 --- a/usr/src/cmd/ttymon/sttytable.c +++ b/usr/src/cmd/ttymon/sttytable.c @@ -37,7 +37,7 @@ #include <sys/termiox.h> #include "stty.h" -const struct speeds speeds[] = { +const struct speeds speeds[] = { "0", B0, 0, "50", B50, 50, "75", B75, 75, @@ -73,6 +73,14 @@ const struct speeds speeds[] = { "460.8", B460800, 460800, "921600", B921600, 921600, "921.6", B921600, 921600, + "1000000", B1000000, 1000000, + "1152000", B1152000, 1152000, + "1500000", B1500000, 1500000, + "2000000", B2000000, 2000000, + "2500000", B2500000, 2500000, + "3000000", B3000000, 3000000, + "3500000", B3500000, 3500000, + "4000000", B4000000, 4000000, 0, }; diff --git a/usr/src/lib/libcurses/screen/delay.c b/usr/src/lib/libcurses/screen/delay.c index fe570b9148..8e1de3e4cf 100644 --- a/usr/src/lib/libcurses/screen/delay.c +++ b/usr/src/lib/libcurses/screen/delay.c @@ -47,17 +47,40 @@ * character for each speed as returned by gtty. Thus since 300 * baud returns a 7, there are 33.3 milliseconds per char at 300 baud. */ -static short tmspc10[] = - { - /* 0 50 75 110 134.5 150 200 300 baud */ - 0, 2000, 1333, 909, 743, 666, 500, 333, - /* 600 1200 1800 2400 4800 9600 19200 38400 baud */ - 166, 83, 55, 41, 20, 10, 5, 2, - /* 57600, 76800, 115200, 153600, 230400, 307200 baud */ - 2, 1, 1, 1, 1, 1, - /* 460800, 921600 baud */ - 1, 1 - }; +static short tmspc10[] = { + 0, /* 0 baud */ + 2000, /* 50 baud */ + 1333, /* 75 baud */ + 909, /* 110 baud */ + 743, /* 134 baud */ + 666, /* 150 baud */ + 500, /* 200 baud */ + 333, /* 300 baud */ + 166, /* 600 baud */ + 83, /* 1200 baud */ + 55, /* 1800 baud */ + 41, /* 2400 baud */ + 20, /* 4800 baud */ + 10, /* 9600 baud */ + 5, /* 19200 baud */ + 2, /* 38400 baud */ + 2, /* 57600 baud */ + 1, /* 76800 baud */ + 1, /* 115200 baud */ + 1, /* 153600 baud */ + 1, /* 230400 baud */ + 1, /* 307200 baud */ + 1, /* 460800 baud */ + 1, /* 921600 baud */ + 1, /* 1000000 baud */ + 1, /* 1152000 baud */ + 1, /* 1500000 baud */ + 1, /* 2000000 baud */ + 1, /* 2500000 baud */ + 1, /* 3000000 baud */ + 1, /* 3500000 baud */ + 1, /* 4000000 baud */ +}; /* * Insert a delay into the output stream for "delay/10" milliseconds. diff --git a/usr/src/lib/libcurses/screen/newscreen.c b/usr/src/lib/libcurses/screen/newscreen.c index ea5ec923c0..129395a4b5 100644 --- a/usr/src/lib/libcurses/screen/newscreen.c +++ b/usr/src/lib/libcurses/screen/newscreen.c @@ -50,11 +50,13 @@ extern char _endwin; #endif /* _VR2_COMPAT_CODE */ /* 1200 is put at the 0th location since 0 is probably a mistake. */ -static long baud_convert[] = { - 1200, 50, 75, 110, 135, 150, 200, 300, 600, 1200, - 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, - 115200, 153600, 230400, 307200, 460800, 921600 - }; +static long baud_convert[] = { + 1200, 50, 75, 110, 134, 150, 200, 300, 600, 1200, + 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, + 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, + 3000000, 3500000, 4000000 +}; static char isfilter = 0; static int _chk_trm(void); diff --git a/usr/src/lib/libnsl/dial/line.c b/usr/src/lib/libnsl/dial/line.c index 08195abbbd..b5a3d6462d 100644 --- a/usr/src/lib/libnsl/dial/line.c +++ b/usr/src/lib/libnsl/dial/line.c @@ -36,49 +36,45 @@ #include "uucp.h" static const struct sg_spds { - int sp_val, - sp_name; + int sp_val; + int sp_name; } spds[] = { - { 50, B50}, - { 75, B75}, - { 110, B110}, - { 134, B134}, - { 150, B150}, - { 200, B200}, - { 300, B300}, - { 600, B600}, - {1200, B1200}, - {1800, B1800}, - {2400, B2400}, - {4800, B4800}, - {9600, B9600}, -#ifdef EXTA - {19200, EXTA}, -#endif -#ifdef B19200 - {19200, B19200}, -#endif -#ifdef B38400 - {38400, B38400}, -#endif - {57600, B57600}, - {76800, B76800}, - {115200, B115200}, - {153600, B153600}, - {230400, B230400}, - {307200, B307200}, - {460800, B460800}, - {921600, B921600}, - {0, 0} + { 50, B50 }, + { 75, B75 }, + { 110, B110 }, + { 134, B134 }, + { 150, B150 }, + { 200, B200 }, + { 300, B300 }, + { 600, B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, + { 4800, B4800 }, + { 9600, B9600 }, + { 19200, B19200 }, + { 38400, B38400 }, + { 57600, B57600 }, + { 76800, B76800 }, + { 115200, B115200 }, + { 153600, B153600 }, + { 230400, B230400 }, + { 307200, B307200 }, + { 460800, B460800 }, + { 921600, B921600 }, + { 1000000, B1000000 }, + { 1152000, B1152000 }, + { 1500000, B1500000 }, + { 2000000, B2000000 }, + { 2500000, B2500000 }, + { 3000000, B3000000 }, + { 3500000, B3500000 }, + { 4000000, B4000000 }, + { 0, 0} }; -#define PACKSIZE 64 #define HEADERSIZE 6 -#define SNDFILE 'S' -#define RCVFILE 'R' -#define RESET 'X' - static int Saved_line; /* was savline() successful? */ static int Saved_termios; /* was termios saved? */ static int @@ -127,7 +123,7 @@ fixline(int tty, int spwant, int type) ttbufs.c_cc[i] = ttbuf.c_cc[i]; } if (spwant > 0) { - for (ps = spds; ps->sp_val; ps++) + for (ps = spds; ps->sp_val != 0; ps++) if (ps->sp_val == spwant) { speed = ps->sp_name; break; @@ -143,7 +139,7 @@ fixline(int tty, int spwant, int type) ospeed = cfgetospeed(&ttbufs); ttbufs.c_cflag &= 0xffff0000; (void) cfsetospeed(&ttbufs, ospeed); - for (ps = spds; ps->sp_val; ps++) + for (ps = spds; ps->sp_val != 0; ps++) if (ps->sp_name == ospeed) { spwant = ps->sp_val; break; diff --git a/usr/src/lib/libxcurses/src/libc/xcurses/baudrate.c b/usr/src/lib/libxcurses/src/libc/xcurses/baudrate.c index f14c3f2075..65e4435854 100644 --- a/usr/src/lib/libxcurses/src/libc/xcurses/baudrate.c +++ b/usr/src/lib/libxcurses/src/libc/xcurses/baudrate.c @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * baudrate.c * @@ -35,12 +33,6 @@ * */ -#ifdef M_RCSID -#ifndef lint -static char rcsID[] = "$Header: /rd/src/libc/xcurses/rcs/baudrate.c 1.2 1995/09/27 19:09:07 ant Exp $"; -#endif -#endif - #include <private.h> typedef struct { @@ -49,26 +41,42 @@ typedef struct { } t_baud; static t_baud speeds[] = { - { B0, 0 }, - { B50, 50 }, - { B75, 75 }, - { B110, 110 }, - { B134, 134 }, - { B150, 150 }, - { B200, 200 }, - { B300, 300 }, - { B600, 600 }, - { B1200, 1200 }, - { B1800, 1800 }, - { B2400, 2400 }, - { B4800, 4800 }, - { B9600, 9600 }, - { B19200, 19200 }, - { B38400, 38400 }, - { (speed_t) -1, -1 } + { B0, 0 }, + { B50, 50 }, + { B75, 75 }, + { B110, 110 }, + { B134, 134 }, + { B150, 150 }, + { B200, 200 }, + { B300, 300 }, + { B600, 600 }, + { B1200, 1200 }, + { B1800, 1800 }, + { B2400, 2400 }, + { B4800, 4800 }, + { B9600, 9600 }, + { B19200, 19200 }, + { B38400, 38400 }, + { B57600, 57600 }, + { B76800, 76800 }, + { B115200, 115200 }, + { B153600, 153600 }, + { B230400, 230400 }, + { B307200, 307200 }, + { B460800, 460800 }, + { B921600, 921600 }, + { B1000000, 1000000 }, + { B1152000, 1152000 }, + { B1500000, 1500000 }, + { B2000000, 2000000 }, + { B2500000, 2500000 }, + { B3000000, 3000000 }, + { B3500000, 3500000 }, + { B4000000, 4000000 }, + { (speed_t)-1, -1 } }; -/*f +/* * Return the output speed of the terminal. The number returned is in * bits per second and is an integer. */ @@ -84,9 +92,11 @@ baudrate() value = cfgetospeed(&cur_term->_prog); - for (i = 0; speeds[i].speed != (speed_t) -1; ++i) - if (speeds[i].speed == value) + for (i = 0; speeds[i].speed != (speed_t) -1; ++i) { + if (speeds[i].speed == value) { break; + } + } return __m_return_int("baudrate", speeds[i].value); } diff --git a/usr/src/lib/libxcurses2/src/libc/xcurses/baudrate.c b/usr/src/lib/libxcurses2/src/libc/xcurses/baudrate.c index 85167733e5..3444119816 100644 --- a/usr/src/lib/libxcurses2/src/libc/xcurses/baudrate.c +++ b/usr/src/lib/libxcurses2/src/libc/xcurses/baudrate.c @@ -24,10 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* LINTLIBRARY */ - /* * baudrate.c * @@ -37,15 +33,6 @@ * */ -#ifdef M_RCSID -#ifndef lint -static char rcsID[] = -"$Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/" -"libxcurses/src/libc/xcurses/rcs/baudrate.c 1.3 1998/06/04 19:55:42 " -"cbates Exp $"; -#endif -#endif - #include <private.h> typedef struct { @@ -54,23 +41,39 @@ typedef struct { } t_baud; static const t_baud speeds[] = { - { B0, 0 }, - { B50, 50 }, - { B75, 75 }, - { B110, 110 }, - { B134, 134 }, - { B150, 150 }, - { B200, 200 }, - { B300, 300 }, - { B600, 600 }, - { B1200, 1200 }, - { B1800, 1800 }, - { B2400, 2400 }, - { B4800, 4800 }, - { B9600, 9600 }, - { B19200, 19200 }, - { B38400, 38400 }, - { (speed_t) -1, -1 } + { B0, 0 }, + { B50, 50 }, + { B75, 75 }, + { B110, 110 }, + { B134, 134 }, + { B150, 150 }, + { B200, 200 }, + { B300, 300 }, + { B600, 600 }, + { B1200, 1200 }, + { B1800, 1800 }, + { B2400, 2400 }, + { B4800, 4800 }, + { B9600, 9600 }, + { B19200, 19200 }, + { B38400, 38400 }, + { B57600, 57600 }, + { B76800, 76800 }, + { B115200, 115200 }, + { B153600, 153600 }, + { B230400, 230400 }, + { B307200, 307200 }, + { B460800, 460800 }, + { B921600, 921600 }, + { B1000000, 1000000 }, + { B1152000, 1152000 }, + { B1500000, 1500000 }, + { B2000000, 2000000 }, + { B2500000, 2500000 }, + { B3000000, 3000000 }, + { B3500000, 3500000 }, + { B4000000, 4000000 }, + { (speed_t)-1, -1 } }; /* @@ -85,9 +88,11 @@ baudrate(void) value = cfgetospeed(PTERMIOS(_prog)); - for (i = 0; speeds[i].speed != (speed_t) -1; ++i) - if (speeds[i].speed == value) + for (i = 0; speeds[i].speed != (speed_t) -1; ++i) { + if (speeds[i].speed == value) { break; + } + } return (speeds[i].value); } diff --git a/usr/src/man/man1/stty.1 b/usr/src/man/man1/stty.1 index dd924bc396..7ae66f824c 100644 --- a/usr/src/man/man1/stty.1 +++ b/usr/src/man/man1/stty.1 @@ -45,7 +45,7 @@ .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved .\" Copyright (c) 2014, Joyent, Inc. All Rights Reserved .\" -.TH STTY 1 "Dec 30, 2016" +.TH STTY 1 "Aug 13, 2021" .SH NAME stty \- set the options for a terminal .SH SYNOPSIS @@ -268,6 +268,18 @@ bytes per character, and screen or display columns per character. .na \fB153600 230400 307200 460800\fR .ad +.br +.na +\fB921600 1000000 1152000 1500000 \fR +.ad +.br +.na +\fB2000000 2500000 3000000 3500000 \fR +.ad +.br +.na +\fB4000000 +.ad .sp .6 .RS 4n Set terminal baud rate to the number given, if possible. (All speeds are not @@ -291,6 +303,18 @@ supported by all hardware interfaces.) .na \fB153600 230400 307200 460800\fR .ad +.br +.na +\fB921600 1000000 1152000 1500000 \fR +.ad +.br +.na +\fB2000000 2500000 3000000 3500000 \fR +.ad +.br +.na +\fB4000000 +.ad .sp .6 .RS 4n Set terminal input baud rate to the number given, if possible. (Not all @@ -315,6 +339,18 @@ the input baud rate is specified by the value of the output baud rate. .na \fB153600 230400 307200 460800\fR .ad +.br +.na +\fB921600 1000000 1152000 1500000 \fR +.ad +.br +.na +\fB2000000 2500000 3000000 3500000 \fR +.ad +.br +.na +\fB4000000 +.ad .sp .6 .RS 4n Set terminal output baud rate to the number given, if possible. (Not all diff --git a/usr/src/man/man7d/usbftdi.7d b/usr/src/man/man7d/usbftdi.7d index d555c08623..0fc49718d7 100644 --- a/usr/src/man/man7d/usbftdi.7d +++ b/usr/src/man/man7d/usbftdi.7d @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH USBFTDI 7D "Apr 13, 2009" +.TH USBFTDI 7D "Aug 13, 2021" .SH NAME usbftdi \- FTDI USB to serial converter driver .SH SYNOPSIS @@ -49,10 +49,10 @@ defined in \fBtermio\fR(7I). .sp .LP Input and output line speeds can be set to the following baud rates: 300, 600, -1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800 or 921600. -Input and output line speeds can not be set independently. For example, when -the output speed is set, the input speed is automatically set to the same -speed. +1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600, +2000000, or 3000000. Input and output line speeds can not be set +independently. For example, when the output speed is set, the input speed is +automatically set to the same speed. .SS "Soft Carrier Capabilities" .sp .LP diff --git a/usr/src/man/man7d/usbsacm.7d b/usr/src/man/man7d/usbsacm.7d index 387a9ad413..ac478e5c21 100644 --- a/usr/src/man/man7d/usbsacm.7d +++ b/usr/src/man/man7d/usbsacm.7d @@ -3,7 +3,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH USBSACM 7D "Nov 1, 2006" +.TH USBSACM 7D "Aug 13, 2021" .SH NAME usbsacm \- USB communication device class ACM driver .SH SYNOPSIS @@ -87,8 +87,10 @@ calls. .LP The input and output line speeds may be set to any of the following baud rates: 75, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, -230400 or 460800. The speeds cannot be set independently. For example, when the -output speed is set, the input speed is automatically set to the same speed. +230400, 460800, 921600, 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, +3500000, or 4000000. The speeds cannot be set independently. For example, when +the output speed is set, the input speed is automatically set to the same +speed. .SH ERRORS .sp .LP diff --git a/usr/src/man/man7i/termio.7i b/usr/src/man/man7i/termio.7i index c71258de0c..ed4bbff5c4 100644 --- a/usr/src/man/man7i/termio.7i +++ b/usr/src/man/man7i/termio.7i @@ -15,7 +15,7 @@ .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] -.Dd March 17, 2019 +.Dd August 13, 2021 .Dt TERMIO 7I .Os .Sh NAME @@ -1124,7 +1124,7 @@ field describes the hardware control of the terminal: .Bl -tag -width CIBAUDEXT -offset 2n .It Dv CBAUD Baud rate: -.Bl -tag -width B460800 -compact +.Bl -tag -width B4000000 -compact .It Dv B0 Hang up .It Dv B50 @@ -1155,12 +1155,8 @@ Hang up 9600 baud .It Dv B19200 19200 baud -.It Dv EXTA -External A .It Dv B38400 38400 baud -.It Dv EXTB -External B .It Dv B57600 57600 baud .It Dv B76800 @@ -1175,6 +1171,24 @@ External B 307200 baud .It Dv B460800 460800 baud +.It Dv B921600 +921600 baud +.It Dv B1000000 +1000000 baud +.It Dv B1152000 +1152000 baud +.It Dv B1500000 +1500000 baud +.It Dv B2000000 +2000000 baud +.It Dv B2500000 +2500000 baud +.It Dv B3000000 +3000000 baud +.It Dv B3500000 +3500000 baud +.It Dv B4000000 +4000000 baud .El .It Dv CSIZE Character size: diff --git a/usr/src/ucbcmd/stty/stty.c b/usr/src/ucbcmd/stty/stty.c index 127a118c78..2914d913aa 100644 --- a/usr/src/ucbcmd/stty/stty.c +++ b/usr/src/ucbcmd/stty/stty.c @@ -755,10 +755,12 @@ delay(int m, char *s) (void) fprintf(output, "%s%d ", s, m); } -long speed[] = { +long speed[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, - 57600, 76800, 115200, 153600, 230400, 307200, 460800, 921600 + 57600, 76800, 115200, 153600, 230400, 307200, 460800, 921600, + 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, 3500000, + 4000000 }; void diff --git a/usr/src/ucbcmd/stty/sttytable.c b/usr/src/ucbcmd/stty/sttytable.c index 1544f42fb8..165fdf4bab 100644 --- a/usr/src/ucbcmd/stty/sttytable.c +++ b/usr/src/ucbcmd/stty/sttytable.c @@ -36,21 +36,21 @@ #include "stty.h" const struct speeds speeds[] = { - "0", B0, - "50", B50, - "75", B75, - "110", B110, - "134", B134, - "134.5", B134, - "150", B150, - "200", B200, - "300", B300, - "600", B600, - "1200", B1200, - "1800", B1800, - "2400", B2400, - "4800", B4800, - "9600", B9600, + "0", B0, + "50", B50, + "75", B75, + "110", B110, + "134", B134, + "134.5", B134, + "150", B150, + "200", B200, + "300", B300, + "600", B600, + "1200", B1200, + "1800", B1800, + "2400", B2400, + "4800", B4800, + "9600", B9600, "19200", B19200, "19.2", B19200, "exta", EXTA, @@ -65,6 +65,14 @@ const struct speeds speeds[] = { "307200", B307200, "460800", B460800, "921600", B921600, + "1000000", B1000000, + "1152000", B1152000, + "1500000", B1500000, + "2000000", B2000000, + "2500000", B2500000, + "3000000", B3000000, + "3500000", B3500000, + "4000000", B4000000, 0, }; /* Control Modes */ diff --git a/usr/src/ucbcmd/tset/tset.c b/usr/src/ucbcmd/tset/tset.c index b6cdeb223b..9054fe44ad 100644 --- a/usr/src/ucbcmd/tset/tset.c +++ b/usr/src/ucbcmd/tset/tset.c @@ -348,39 +348,45 @@ struct map { struct map *Map = map; -/* This should be available in an include file */ -struct -{ +struct { char *string; int speed; int baudrate; } speeds[] = { - "0", B0, 0, - "50", B50, 50, - "75", B75, 75, - "110", B110, 110, - "134", B134, 134, - "134.5", B134, 134, - "150", B150, 150, - "200", B200, 200, - "300", B300, 300, - "600", B600, 600, - "1200", B1200, 1200, - "1800", B1800, 1800, - "2400", B2400, 2400, - "4800", B4800, 4800, - "9600", B9600, 9600, - "19200", EXTA, 19200, - "exta", EXTA, 19200, - "extb", EXTB, 38400, - "57600", B57600, 57600, - "76800", B76800, 76800, - "115200", B115200, 115200, - "153600", B153600, 153600, - "230400", B230400, 230400, - "307200", B307200, 307200, - "460800", B460800, 460800, - "921600", B921600, 921600, + "0", B0, 0, + "50", B50, 50, + "75", B75, 75, + "110", B110, 110, + "134", B134, 134, + "134.5", B134, 134, + "150", B150, 150, + "200", B200, 200, + "300", B300, 300, + "600", B600, 600, + "1200", B1200, 1200, + "1800", B1800, 1800, + "2400", B2400, 2400, + "4800", B4800, 4800, + "9600", B9600, 9600, + "19200", EXTA, 19200, + "exta", EXTA, 19200, + "extb", EXTB, 38400, + "57600", B57600, 57600, + "76800", B76800, 76800, + "115200", B115200, 115200, + "153600", B153600, 153600, + "230400", B230400, 230400, + "307200", B307200, 307200, + "460800", B460800, 460800, + "921600", B921600, 921600, + "1000000", B1000000, 1000000, + "1152000", B1152000, 1152000, + "1500000", B1500000, 1500000, + "2000000", B2000000, 2000000, + "2500000", B2500000, 2500000, + "3000000", B3000000, 3000000, + "3500000", B3500000, 3500000, + "4000000", B4000000, 4000000, 0, }; diff --git a/usr/src/uts/common/io/asy.c b/usr/src/uts/common/io/asy.c index a13ae799d5..581079ad17 100644 --- a/usr/src/uts/common/io/asy.c +++ b/usr/src/uts/common/io/asy.c @@ -262,15 +262,15 @@ ushort_t asyspdtab[] = { 0x0, /* 0x8002 (SMC chip) 230400 baud rate not supported */ 0x0, /* 307200 baud rate not supported */ 0x0, /* 0x8001 (SMC chip) 460800 baud rate not supported */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ - 0x0, /* unused */ + 0x0, /* 921600 baud rate not supported */ + 0x0, /* 1000000 baud rate not supported */ + 0x0, /* 1152000 baud rate not supported */ + 0x0, /* 1500000 baud rate not supported */ + 0x0, /* 2000000 baud rate not supported */ + 0x0, /* 2500000 baud rate not supported */ + 0x0, /* 3000000 baud rate not supported */ + 0x0, /* 3500000 baud rate not supported */ + 0x0, /* 4000000 baud rate not supported */ }; static int asyrsrv(queue_t *q); diff --git a/usr/src/uts/common/io/consconfig_dacf.c b/usr/src/uts/common/io/consconfig_dacf.c index 1ee860f47f..b54bff1ed5 100644 --- a/usr/src/uts/common/io/consconfig_dacf.c +++ b/usr/src/uts/common/io/consconfig_dacf.c @@ -235,7 +235,9 @@ static struct speed { {"38400", B38400}, {"57600", B57600}, {"76800", B76800}, {"115200", B115200}, {"153600", B153600}, {"230400", B230400}, {"307200", B307200}, {"460800", B460800}, {"921600", B921600}, - {"", 0} + {"1000000", B1000000}, {"1152000", B1152000}, {"1500000", B1500000}, + {"2000000", B2000000}, {"2500000", B2500000}, {"3000000", B3000000}, + {"3500000", B3500000}, {"4000000", B4000000}, {"", 0} }; static const int MAX_SPEEDS = sizeof (speedtab) / sizeof (speedtab[0]); diff --git a/usr/src/uts/common/io/usb/clients/usbser/usbftdi/uftdi_dsd.c b/usr/src/uts/common/io/usb/clients/usbser/usbftdi/uftdi_dsd.c index 54797211f6..d0fa27b9d8 100644 --- a/usr/src/uts/common/io/usb/clients/usbser/usbftdi/uftdi_dsd.c +++ b/usr/src/uts/common/io/usb/clients/usbser/usbftdi/uftdi_dsd.c @@ -680,6 +680,12 @@ uftdi_param2regs(uftdi_state_t *uf, ds_port_params_t *tp, uftdi_regs_t *ur) case B921600: ur->ur_baud = ftdi_8u232am_b921600; break; + case B2000000: + ur->ur_baud = ftdi_8u232am_b2000000; + break; + case B3000000: + ur->ur_baud = ftdi_8u232am_b3000000; + break; default: USB_DPRINTF_L3(DPRINT_CTLOP, uf->uf_lh, "uftdi_param2regs: bad baud %d", diff --git a/usr/src/uts/common/io/usb/clients/usbser/usbsacm/usbsacm.c b/usr/src/uts/common/io/usb/clients/usbser/usbsacm/usbsacm.c index 678a1f5aca..504cd0ff92 100644 --- a/usr/src/uts/common/io/usb/clients/usbser/usbsacm/usbsacm.c +++ b/usr/src/uts/common/io/usb/clients/usbser/usbsacm/usbsacm.c @@ -448,30 +448,38 @@ static ds_ops_t usbsacm_ds_ops = { * baud code -> baud rate (0 means unsupported rate) */ static int usbsacm_speedtab[] = { - 0, /* B0 */ - 50, /* B50 */ - 75, /* B75 */ - 110, /* B110 */ - 134, /* B134 */ - 150, /* B150 */ - 200, /* B200 */ - 300, /* B300 */ - 600, /* B600 */ - 1200, /* B1200 */ - 1800, /* B1800 */ - 2400, /* B2400 */ - 4800, /* B4800 */ - 9600, /* B9600 */ - 19200, /* B19200 */ - 38400, /* B38400 */ - 57600, /* B57600 */ - 76800, /* B76800 */ - 115200, /* B115200 */ - 153600, /* B153600 */ - 230400, /* B230400 */ - 307200, /* B307200 */ - 460800, /* B460800 */ - 921600 /* B921600 */ + 0, /* B0 */ + 50, /* B50 */ + 75, /* B75 */ + 110, /* B110 */ + 134, /* B134 */ + 150, /* B150 */ + 200, /* B200 */ + 300, /* B300 */ + 600, /* B600 */ + 1200, /* B1200 */ + 1800, /* B1800 */ + 2400, /* B2400 */ + 4800, /* B4800 */ + 9600, /* B9600 */ + 19200, /* B19200 */ + 38400, /* B38400 */ + 57600, /* B57600 */ + 76800, /* B76800 */ + 115200, /* B115200 */ + 153600, /* B153600 */ + 230400, /* B230400 */ + 307200, /* B307200 */ + 460800, /* B460800 */ + 921600, /* B921600 */ + 1000000, /* B1000000 */ + 1152000, /* B1152000 */ + 1500000, /* B1500000 */ + 2000000, /* B2000000 */ + 2500000, /* B2500000 */ + 3000000, /* B3000000 */ + 3500000, /* B3500000 */ + 4000000, /* B4000000 */ }; diff --git a/usr/src/uts/common/sys/termios.h b/usr/src/uts/common/sys/termios.h index 0c07623ce6..86ee3980c4 100644 --- a/usr/src/uts/common/sys/termios.h +++ b/usr/src/uts/common/sys/termios.h @@ -329,8 +329,8 @@ extern pid_t tcgetsid(int); /* Slots reserved for 386/XENIX compatibility - keyboard control */ #define TIOCKBON (_TIOC|8) -#define TIOCKBOF (_TIOC|9) -#define KBENABLED (_TIOC|10) +#define TIOCKBOF (_TIOC|9) +#define KBENABLED (_TIOC|10) #ifndef IOCTYPE #define IOCTYPE 0xff00 @@ -413,7 +413,7 @@ struct ppsclockev32 { #define TIOCSETD (tIOC|1) #define TIOCHPCL (tIOC|2) #define TIOCGETP (tIOC|8) -#define TIOCSETP (tIOC|9) +#define TIOCSETP (tIOC|9) #define TIOCSETN (tIOC|10) #define TIOCEXCL (tIOC|13) #define TIOCNXCL (tIOC|14) @@ -522,30 +522,38 @@ struct ppsclockev32 { /* * Speeds */ -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define B19200 14 -#define B38400 15 -#define B57600 16 -#define B76800 17 -#define B115200 18 -#define B153600 19 -#define B230400 20 -#define B307200 21 -#define B460800 22 -#define B921600 23 +#define B0 0 +#define B50 1 +#define B75 2 +#define B110 3 +#define B134 4 +#define B150 5 +#define B200 6 +#define B300 7 +#define B600 8 +#define B1200 9 +#define B1800 10 +#define B2400 11 +#define B4800 12 +#define B9600 13 +#define B19200 14 +#define B38400 15 +#define B57600 16 +#define B76800 17 +#define B115200 18 +#define B153600 19 +#define B230400 20 +#define B307200 21 +#define B460800 22 +#define B921600 23 +#define B1000000 24 +#define B1152000 25 +#define B1500000 26 +#define B2000000 27 +#define B2500000 28 +#define B3000000 29 +#define B3500000 30 +#define B4000000 31 #ifndef _SYS_TTOLD_H |