diff -r 47508b8cd2eb usr/src/grub/grub-0.97/grub/asmstub.c --- a/usr/src/grub/grub-0.97/grub/asmstub.c Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/grub/grub-0.97/grub/asmstub.c Tue Jun 14 05:05:19 2011 +0100 @@ -1135,15 +1135,7 @@ goto fail; /* Raw mode. */ -#if defined(__sun) - termios.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); - termios.c_oflag &= ~OPOST; - termios.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); - termios.c_cflag &= ~(CSIZE|PARENB); - termios.c_cflag |= CS8; -#else cfmakeraw (&termios); -#endif /* Set the speed. */ termios_speed = get_termios_speed (speed); diff -r 47508b8cd2eb usr/src/lib/c_synonyms/syn_common --- a/usr/src/lib/c_synonyms/syn_common Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/c_synonyms/syn_common Tue Jun 14 05:05:19 2011 +0100 @@ -179,6 +179,7 @@ cfgetospeed cfsetispeed cfsetospeed +cfmakeraw cftime chdir chmod diff -r 47508b8cd2eb usr/src/lib/libc/amd64/Makefile --- a/usr/src/lib/libc/amd64/Makefile Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/libc/amd64/Makefile Tue Jun 14 05:05:19 2011 +0100 @@ -346,6 +346,7 @@ cfree.o \ cfsetispeed.o \ cfsetospeed.o \ + cfmakeraw.o \ cftime.o \ clock.o \ closedir.o \ diff -r 47508b8cd2eb usr/src/lib/libc/i386/Makefile.com --- a/usr/src/lib/libc/i386/Makefile.com Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/libc/i386/Makefile.com Tue Jun 14 05:05:19 2011 +0100 @@ -377,6 +377,7 @@ cfree.o \ cfsetispeed.o \ cfsetospeed.o \ + cfmakeraw.o \ cftime.o \ clock.o \ closedir.o \ diff -r 47508b8cd2eb usr/src/lib/libc/port/gen/cfmakeraw.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/lib/libc/port/gen/cfmakeraw.c Tue Jun 14 05:05:19 2011 +0100 @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * 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] + * + * CDDL HEADER END + */ + +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ + +#pragma weak _cfmakeraw = cfmakeraw + +#include "lint.h" +#include +#include + +/* + * set the structure pointed to by termios_p to raw mode + */ + +void +cfmakeraw(struct termios *termios_p) +{ + termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP| + INLCR|IGNCR|ICRNL|IXON); + termios_p->c_oflag &= ~OPOST; + termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + termios_p->c_cflag &= ~(CSIZE|PARENB); + termios_p->c_cflag |= CS8; + termios_p->c_cc[VMIN] = 1; + termios_p->c_cc[VTIME] = 0; +} diff -r 47508b8cd2eb usr/src/lib/libc/port/llib-lc --- a/usr/src/lib/libc/port/llib-lc Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/libc/port/llib-lc Tue Jun 14 05:05:19 2011 +0100 @@ -307,6 +307,9 @@ /* cfsetospeed.c */ int cfsetospeed(struct termios *termios_p, speed_t speed); +/* cfmakeraw.c */ +void cfmakeraw(struct termios *termios_p); + /* cftime.c */ int cftime(char *buf, char *format, const time_t *t); int ascftime(char *buf, const char *format, const struct tm *tm); diff -r 47508b8cd2eb usr/src/lib/libc/port/mapfile-vers --- a/usr/src/lib/libc/port/mapfile-vers Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/libc/port/mapfile-vers Tue Jun 14 05:05:19 2011 +0100 @@ -90,6 +90,8 @@ SYMBOL_VERSION ILLUMOS_0.1 { # Illumos additions protected: + cfmakeraw; + _cfmakeraw; timegm; } SUNW_1.23; diff -r 47508b8cd2eb usr/src/lib/libc/sparc/Makefile.com --- a/usr/src/lib/libc/sparc/Makefile.com Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/lib/libc/sparc/Makefile.com Tue Jun 14 05:05:19 2011 +0100 @@ -407,6 +407,7 @@ cfree.o \ cfsetispeed.o \ cfsetospeed.o \ + cfmakeraw.o \ cftime.o \ clock.o \ closedir.o \ diff -r 47508b8cd2eb usr/src/uts/common/sys/termios.h --- a/usr/src/uts/common/sys/termios.h Fri Jun 03 11:40:03 2011 -0400 +++ b/usr/src/uts/common/sys/termios.h Tue Jun 14 05:05:19 2011 +0100 @@ -104,6 +104,7 @@ extern int cfsetospeed(struct termios *, speed_t); extern speed_t cfgetispeed(const struct termios *); extern int cfsetispeed(struct termios *, speed_t); +extern void cfmakeraw(struct termios *); extern int tcgetattr(int, struct termios *); extern int tcsetattr(int, int, const struct termios *); extern int tcsendbreak(int, int); @@ -117,6 +118,7 @@ extern int cfsetospeed(); extern speed_t cfgetispeed(); extern int cfsetispeed(); +extern void cfmakeraw(); extern int tcgetattr(); extern int tcsetattr(); extern int tcsendbreak();