Print this page
1060 termios missing cfmakeraw
Reviewed by: Cyril Plisko <cyril.plisko@mountall.com>
Reviewed by: Albert Lee <trisk@opensolaris.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/grub/grub-0.97/grub/asmstub.c
          +++ new/usr/src/grub/grub-0.97/grub/asmstub.c
↓ open down ↓ 1127 lines elided ↑ open up ↑
1128 1128  #endif
1129 1129                      );
1130 1130    if (serial_fd < 0)
1131 1131      return 0;
1132 1132  
1133 1133    /* Get the termios parameters.  */
1134 1134    if (tcgetattr (serial_fd, &termios))
1135 1135      goto fail;
1136 1136  
1137 1137    /* Raw mode.  */
1138      -#if defined(__sun)
1139      -  termios.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
1140      -  termios.c_oflag &= ~OPOST;
1141      -  termios.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
1142      -  termios.c_cflag &= ~(CSIZE|PARENB);
1143      -  termios.c_cflag |= CS8;
1144      -#else
1145 1138    cfmakeraw (&termios);
1146      -#endif
1147 1139  
1148 1140    /* Set the speed.  */
1149 1141    termios_speed = get_termios_speed (speed);
1150 1142    if (termios_speed == B0)
1151 1143      goto fail;
1152 1144    
1153 1145    cfsetispeed (&termios, termios_speed);
1154 1146    cfsetospeed (&termios, termios_speed);
1155 1147  
1156 1148    /* Set the word length.  */
↓ open down ↓ 156 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX