Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 1998 08:50:02 -0800 (PST)
From:      Nick <nsayer@quack.kfu.com>
To:        freebsd-bugs
Subject:   Re: bin/5959: Cannot set up clocal gettys
Message-ID:  <199803111650.IAA07049@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5959; it has been noted by GNATS.

From: Nick <nsayer@quack.kfu.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: bin/5959: Cannot set up clocal gettys
Date: Wed, 11 Mar 1998 16:42:41 +0000

 This patch adds the 'nc' flag to getty, which will make getty
 open non-blocking and set clocal.
 
 Many wet noodle whippings to getty for totally and willfully
 destroying the settings one sets up on the i device.
 
 --- init.c.orig Sat May 10 22:28:54 1997
 +++ init.c      Tue Mar 10 16:45:48 1998
 @@ -142,5 +142,6 @@
         { "np", 0 },                    /* no parity at all (8bit chars)
 */
         { "mb", 0 },                    /* do MDMBUF flow control */
         { "hw", 0 },                    /* do CTSRTS flow control */
 +       { "nc", 0 },                    /* set clocal */
         { 0 }
  };
 --- gettytab.h.orig     Sat May 10 22:28:53 1997
 +++ gettytab.h  Tue Mar 10 16:52:04 1998
 @@ -170,4 +170,5 @@
  #define        NP      gettyflags[21].value
  #define        MB      gettyflags[22].value
  #define HW     gettyflags[23].value
 +#define NC     gettyflags[24].value
 
 --- main.c.orig Sun Aug 17 16:44:34 1997
 +++ main.c      Tue Mar 10 16:57:58 1998
 @@ -266,8 +266,8 @@
                                 (void)tcsetattr(STDIN_FILENO, TCSANOW,
 &tmode);
                                 exit(1);
                         }
 -               } else { /* blocking open */
 -                       if (!opentty(ttyn, O_RDWR))
 +               } else { /* maybe blocking open */
 +                       if (!opentty(ttyn, O_RDWR|(NC?O_NONBLOCK:0)))
                                 exit(1);
                 }
             }
 @@ -289,6 +289,7 @@
         tmode.c_oflag = TTYDEF_OFLAG;
         tmode.c_lflag = TTYDEF_LFLAG;
         tmode.c_cflag = TTYDEF_CFLAG;
 +       tmode.c_cflag |= (NC?CLOCAL:0);
         omode = tmode;
 
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803111650.IAA07049>