changeset 3559:a9b886b3f976

(init_baud_rate) [HAVE_TERMIOS]: Use cfgetospeed.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Jun 1993 23:57:08 +0000
parents f7f187debe2d
children 95021dcb923b
files src/sysdep.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Mon Jun 07 23:52:45 1993 +0000
+++ b/src/sysdep.c	Mon Jun 07 23:57:08 1993 +0000
@@ -239,7 +239,7 @@
 
       sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600;
       tcgetattr (0, &sg);
-      ospeed = sg.c_cflag & CBAUD;
+      ospeed = cfgetospeed (&sg);
 #else /* neither VMS nor TERMIOS */
 #ifdef HAVE_TERMIO
       struct termio sg;
@@ -255,7 +255,8 @@
       struct sgttyb sg;
       
       sg.sg_ospeed = B9600;
-      ioctl (0, TIOCGETP, &sg);
+      if (ioctl (0, TIOCGETP, &sg) < 0)
+	abort ();
       ospeed = sg.sg_ospeed;
 #endif /* not HAVE_TERMIO */
 #endif /* not HAVE_TERMIOS */