Subject: bin/7751: stty doesn't accept g-format data
To: None <gnats-bugs@gnats.netbsd.org>
From: NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
List: netbsd-bugs
Date: 06/10/1999 07:52:54
>Number:         7751
>Category:       bin
>Synopsis:       stty doesn't accept g-format data
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 10 07:50:02 1999
>Last-Modified:
>Originator:     NAKAJIMA Yoshihiro
>Organization:
>Release:        NetBSD-current 19990609
>Environment:
System: NetBSD asura 1.4C NetBSD 1.4C (ASURA) #1: Thu Jun 10 22:12:58 JST 1999 nakayosh@asura:/usr/src/sys/arch/i386/compile/ASURA i386

>Description:

Stty doesn't accept g-format data.

In gfmt.c, there are the following descriptions:

: #ifdef BSD4_4
: 		if (CHK("ispeed")) {
: 			(void)sscanf(ep, "%ld", &tmp);
: 			tp->c_ispeed = tmp;
: 			continue;
: 		}
: #endif

But BSD4_4 isn't defined.

>How-To-Repeat:

: % stty `stty -g`
: stty: illegal gfmt1 option -- ispeed

>Fix:

diff -u src/bin/stty/gfmt.c.ORIG src/bin/stty/gfmt.c
--- src/bin/stty/gfmt.c.ORIG	Wed Mar  3 21:05:19 1999
+++ src/bin/stty/gfmt.c	Thu Jun 10 22:41:46 1999
@@ -42,6 +42,7 @@
 #endif
 #endif /* not lint */
 
+#include <sys/param.h>			/* BSD4_4 */
 #include <sys/types.h>
 
 #include <err.h>

>Audit-Trail:
>Unformatted: