From taob@risc.org  Fri Jan  2 06:16:36 1998
Received: from risc.org (trt-on1-28.netcom.ca [207.181.81.92])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA03790
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 2 Jan 1998 06:16:33 -0800 (PST)
          (envelope-from taob@risc.org)
Received: (from root@localhost)
	by risc.org (8.8.8/8.8.8) id JAA12428;
	Fri, 2 Jan 1998 09:16:31 -0500 (EST)
	(envelope-from taob)
Message-Id: <199801021416.JAA12428@risc.org>
Date: Fri, 2 Jan 1998 09:16:31 -0500 (EST)
From: taob@netcom.ca
Reply-To: taob@netcom.ca
To: FreeBSD-gnats-submit@freebsd.org
Subject: /dev/MAKEDEV reverse mknod arguments for vty* target
X-Send-Pr-Version: 3.2

>Number:         5411
>Category:       misc
>Synopsis:       /dev/MAKEDEV reverse mknod arguments for vty* target
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan  2 06:20:01 PST 1998
>Closed-Date:    Fri Jan 2 14:16:25 PST 1998
>Last-Modified:  Fri Jan  2 14:16:39 PST 1998
>Originator:     Brian Tao
>Release:        FreeBSD 3.0-980101-SNAP i386
>Organization:
Netcom Canada
>Environment:

    3.0-980101-SNAP default installation.

>Description:

    3.0-980101-SNAP creates /dev/ttyv* entries with the wrong
major/minor device numbers.

>How-To-Repeat:

# cd /dev
# ./MAKEDEV vty8
# ls -l
crw-------  1 root  wheel    0,   12 Jan  2 08:20 ttyv0
crw-------  1 root  wheel    1,   12 Jan  2 08:52 ttyv1
crw-------  1 root  wheel    2,   12 Jan  2 08:52 ttyv2
crw-------  1 root  wheel    3,   12 Jan  2 08:52 ttyv3
crw-------  1 root  wheel    4,   12 Jan  2 08:52 ttyv4
crw-------  1 root  wheel    5,   12 Jan  2 08:52 ttyv5
crw-------  1 root  wheel    6,   12 Jan  2 08:52 ttyv6
crw-------  1 root  wheel    7,   12 Jan  2 08:20 ttyv7

>Fix:

    Reverse the order of the mknod arguments for vty:

*** MAKEDEV	Fri Jan  2 09:10:49 1998
--- MAKEDEV.orig	Thu Jan  1 05:09:31 1998
***************
*** 696,702 ****
  	units=`expr $i : 'vty\(.*\)'`
  	eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
  		for (i = 0; i < n; i++)
! 			printf("mknod ttyv%01x c %d %d;", i, c, i); }'`
  	ln -fs ttyv0 vga	# XXX X still needs this pccons relic
  	;;
  
--- 696,702 ----
  	units=`expr $i : 'vty\(.*\)'`
  	eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
  		for (i = 0; i < n; i++)
! 			printf("mknod ttyv%01x c %d %d;", i, i, c); }'`
  	ln -fs ttyv0 vga	# XXX X still needs this pccons relic
  	;;
  
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Fri Jan 2 14:16:25 PST 1998 
State-Changed-Why:  
Whoops!  Right you are. :)  Thanks! 
>Unformatted:
