NetBSD Problem Report #45514

From www@NetBSD.org  Sun Oct 23 18:06:37 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5265F63D64E
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 23 Oct 2011 18:06:37 +0000 (UTC)
Message-Id: <20111023180636.2BC3A63D49B@www.NetBSD.org>
Date: Sun, 23 Oct 2011 18:06:36 +0000 (UTC)
From: ryo@nerv.org
Reply-To: ryo@nerv.org
To: gnats-bugs@NetBSD.org
Subject: MAKEDEV doesn't  create /dev/tty20 and over
X-Send-Pr-Version: www-1.0

>Number:         45514
>Category:       bin
>Synopsis:       MAKEDEV doesn't  create /dev/tty20 and over
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 23 18:10:00 +0000 2011
>Last-Modified:  Wed Oct 26 16:05:01 +0000 2011
>Originator:     Ryo Shimizu
>Release:        5.99.56
>Organization:
>Environment:
NetBSD falsie 5.99.56 NetBSD 5.99.56 (FALSIE.CUR) #1: Fri Oct 21 19:36:48 JST 2011  ryo@phenomena:/src/cvs/NetBSD/sys/arch/amd64/compile/FALSIE.CUR amd64

>Description:
/dev/MAKEDEV doesn't create /dev/tty20 and over
>How-To-Repeat:
attach over com20, and MAKEDEV tty20.


Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
   2006, 2007, 2008, 2009, 2010, 2011
   The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
   The Regents of the University of California.  All rights reserved.

NetBSD 5.99.56 (FALSIE.CUR) #0: Fri Oct 21 19:28:31 JST 2011
        ryo@phenomena:/src/cvs/NetBSD/sys/arch/amd64/compile/FALSIE.CUR
total memory = 1023 MB
avail memory = 976 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
MSI MS-6702E (1.0)
mainbus0 (root)
cpu0 at mainbus0 apid 0: AMD Athlon(tm) 64 Processor 3000+, id 0x20ff2
ioapic0 at mainbus0 apid 1: pa 0xfec00000, version 3, 24 pins
acpi0 at mainbus0: Intel ACPICA 20110623
acpi0: X/RSDT: OemId <A M I ,OEMRSDT ,01000627>, AslId <MSFT,00000097>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
attimer0 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
pckbc0 at acpi0 (PS2K, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc1 at acpi0 (PS2M, PNP0F03) (aux port): irq 12
pcppi0 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
sysbeep0 at pcppi0
com2 at acpi0 (UAR1, PNP0501-1): io 0x3f8-0x3ff irq 4
com2: ns16550a, working fifo
FDC (PNP0700) at acpi0 not configured
SIOR (PNP0C02) at acpi0 not configured
RMSC (PNP0C02) at acpi0 not configured
OMSC (PNP0C02) at acpi0 not configured
acpibut0 at acpi0 (SLPB, PNP0C0E): ACPI Sleep Button
RMEM (PNP0C01) at acpi0 not configured
acpibut1 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0: attached to pcppi0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x1106 product 0x0282 (rev. 0x00)
agp0 at pchb0: 1 Miscellaneous Control unit(s) found.
agp0: aperture at 0xe0000000, size 0x10000000
pchb1 at pci0 dev 0 function 1: vendor 0x1106 product 0x1282 (rev. 0x00)
pchb2 at pci0 dev 0 function 2: vendor 0x1106 product 0x2282 (rev. 0x00)
pchb3 at pci0 dev 0 function 3: vendor 0x1106 product 0x3282 (rev. 0x00)
pchb4 at pci0 dev 0 function 4: vendor 0x1106 product 0x4282 (rev. 0x00)
pchb5 at pci0 dev 0 function 7: vendor 0x1106 product 0x7282 (rev. 0x00)
ppb0 at pci0 dev 1 function 0: vendor 0x1106 product 0xb188 (rev. 0x00)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: vendor 0x102b product 0x2527 (rev. 0x01)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
mgadrm0 at vga0: Matrox G550 (AGP)
mgadrm0: AGP at 0xe0000000 256MB
mgadrm0: Initialized mga 3.2.2 20060319
puc0 at pci0 dev 5 function 0: SystemBase SB16C1058 (com, com, com, com, com, com, com, com)
com3 at puc0 port 0: interrupting at ioapic0 pin 16
com3: ns16550a, working fifo
com4 at puc0 port 1: interrupting at ioapic0 pin 16
com4: ns16550a, working fifo
com5 at puc0 port 2: interrupting at ioapic0 pin 16
com5: ns16550a, working fifo
com6 at puc0 port 3: interrupting at ioapic0 pin 16
com6: ns16550a, working fifo
com7 at puc0 port 4: interrupting at ioapic0 pin 16
com7: ns16550a, working fifo
com8 at puc0 port 5: interrupting at ioapic0 pin 16
com8: ns16550a, working fifo
com9 at puc0 port 6: interrupting at ioapic0 pin 16
com9: ns16550a, working fifo
com10 at puc0 port 7: interrupting at ioapic0 pin 16
com10: ns16550a, working fifo
puc1 at pci0 dev 6 function 0: Oxford Semiconductor OX16PCI954 UARTs (com, com, com, com)
com11 at puc1 port 0: interrupting at ioapic0 pin 17
com11: ns16550a, working fifo
com12 at puc1 port 1: interrupting at ioapic0 pin 17
com12: ns16550a, working fifo
com13 at puc1 port 2: interrupting at ioapic0 pin 17
com13: ns16550a, working fifo
com14 at puc1 port 3: interrupting at ioapic0 pin 17
com14: ns16550a, working fifo
vendor 0x1415 product 0x9510 (serial communications, interface 0x06) at pci0 dev 6 function 1 not configured
puc2 at pci0 dev 7 function 0: Moxa Technologies, SmartIO CP-104/PCI (com, com, com, com)
com15 at puc2 port 0: interrupting at ioapic0 pin 18
com15: ns16550a, working fifo
com16 at puc2 port 1: interrupting at ioapic0 pin 18
com16: ns16550a, working fifo
com17 at puc2 port 2: interrupting at ioapic0 pin 18
com17: ns16550a, working fifo
com18 at puc2 port 3: interrupting at ioapic0 pin 18
com18: ns16550a, working fifo
puc3 at pci0 dev 8 function 0: EXAR XR17D154 (com, com, com, com)
com19 at puc3 port 0: interrupting at ioapic0 pin 19
com19: ns16550a, working fifo
com20 at puc3 port 1: interrupting at ioapic0 pin 19
com20: ns16550a, working fifo
com21 at puc3 port 2: interrupting at ioapic0 pin 19
com21: ns16550a, working fifo
com22 at puc3 port 3: interrupting at ioapic0 pin 19
com22: ns16550a, working fifo
vge0 at pci0 dev 10 function 0: VIA VT612X Gigabit Ethernet (rev. 0x11)
vge0: interrupting at ioapic0 pin 17
vge0: Ethernet address: 00:02:2a:dd:58:24
    :
    :
(abbr.)


# cd /dev
# ./MAKEDEV tty20
./MAKEDEV: tty20: unknown device
# ./MAKEDEV tty21
./MAKEDEV: tty21: unknown device

>Fix:
Index: MAKEDEV.tmpl
===================================================================
RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.144
diff -a -u -r1.144 MAKEDEV.tmpl
--- MAKEDEV.tmpl        12 Oct 2011 20:57:55 -0000      1.144
+++ MAKEDEV.tmpl        23 Oct 2011 18:01:58 -0000
@@ -1203,7 +1203,7 @@
        lndev dtyZ$unit dty0${unit}
        ;;

-tty0*|tty1*|tty[0-9])
+tty0*|tty1*|tty2*|tty[0-9])
        unit=${i#tty}
        ounit=00$unit
        ounit=${ounit#${ounit%??}}

>Audit-Trail:
From: Julio Merino <jmmv@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: ryo@nerv.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/45514: MAKEDEV doesn't  create /dev/tty20 and over
Date: Sun, 23 Oct 2011 17:55:15 -0400

 > @@ -1203,7 +1203,7 @@
 >         lndev dtyZ$unit dty0${unit}
 >         ;;
 >  
 > -tty0*|tty1*|tty[0-9])
 > +tty0*|tty1*|tty2*|tty[0-9])

 Why not just do "tty[0-9]|tty[0-9][0-9]" ?

 -- 
 Julio Merino / @jmmv

From: Ryo Shimizu <ryo@nerv.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, ryo@nerv.org
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Tue, 25 Oct 2011 13:52:35 +0900

 > > -tty0*|tty1*|tty[0-9])
 > > +tty0*|tty1*|tty2*|tty[0-9])
 > 
 > Why not just do "tty[0-9]|tty[0-9][0-9]" ?

 that is no problem.
 because I tested only tty20 :P

 --
 ryo shimizu

From: David Laight <david@l8s.co.uk>
To: Ryo Shimizu <ryo@nerv.org>
Cc: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Tue, 25 Oct 2011 19:34:27 +0100

 On Tue, Oct 25, 2011 at 01:52:35PM +0900, Ryo Shimizu wrote:
 > 
 > > > -tty0*|tty1*|tty[0-9])
 > > > +tty0*|tty1*|tty2*|tty[0-9])
 > > 
 > > Why not just do "tty[0-9]|tty[0-9][0-9]" ?
 > 
 > that is no problem.
 > because I tested only tty20 :P

 I haven't looked at the MAKEDEV script itself, but the original
 pattern has a trailing '*' so would match tty0fred - I'm not
 sure this is needed/desirable.

 It might be that tty[0-9]* is enough!

 	David

 -- 
 David Laight: david@l8s.co.uk

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Wed, 26 Oct 2011 10:56:50 +0200

 On Tue, 25 Oct 2011, David Laight wrote:
 > I haven't looked at the MAKEDEV script itself, but the original 
 > pattern has a trailing '*' so would match tty0fred - I'm not 
 > sure this is needed/desirable.
 >
 > It might be that tty[0-9]* is enough!

 The case pattern

 	tty0*|tty1*|tty[0-9])

 is one of the few that I did not modify in revision 1.141 of 
 src/etc/MAKEDEV.tmpl.  It's been like that since revision 1.3 
 (from 2003), and before then it was

 	tty0*|tty1*)

 I also think that tty[0-9]* is what we should use here.

 --apb (Alan Barrett)

From: "Alan Barrett" <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45514 CVS commit: src/etc
Date: Wed, 26 Oct 2011 09:02:20 +0000

 Module Name:	src
 Committed By:	apb
 Date:		Wed Oct 26 09:02:20 UTC 2011

 Modified Files:
 	src/etc: MAKEDEV.tmpl

 Log Message:
 Change the pattern for matching ttys to allow any number of digits,
 (tty[0-9]*).  This should fix PR 45514.


 To generate a diff of this commit:
 cvs rdiff -u -r1.144 -r1.145 src/etc/MAKEDEV.tmpl

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	ryo@nerv.org
Cc: 
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Wed, 26 Oct 2011 11:30:43 -0400

 On Oct 26,  9:00am, apb@cequrux.com (Alan Barrett) wrote:
 -- Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over

 | The following reply was made to PR bin/45514; it has been noted by GNATS.
 | 
 | From: Alan Barrett <apb@cequrux.com>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
 | Date: Wed, 26 Oct 2011 10:56:50 +0200
 | 
 |  On Tue, 25 Oct 2011, David Laight wrote:
 |  > I haven't looked at the MAKEDEV script itself, but the original 
 |  > pattern has a trailing '*' so would match tty0fred - I'm not 
 |  > sure this is needed/desirable.
 |  >
 |  > It might be that tty[0-9]* is enough!
 |  
 |  The case pattern
 |  
 |  	tty0*|tty1*|tty[0-9])
 |  
 |  is one of the few that I did not modify in revision 1.141 of 
 |  src/etc/MAKEDEV.tmpl.  It's been like that since revision 1.3 
 |  (from 2003), and before then it was
 |  
 |  	tty0*|tty1*)
 |  
 |  I also think that tty[0-9]* is what we should use here.

 there are two blocks with the same pattern? How is this supposed to work?

 christos

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Wed, 26 Oct 2011 17:52:15 +0200

 On Wed, 26 Oct 2011, Christos Zoulas wrote:
 >there are two blocks with the same pattern? How is this supposed to work?

 src/etc/MAKEDEV.awk removes the first block on systems that 
 don't have the zstty driver, based on the presence of the string 
 %zstty_char% in the MAKEDEV.tmpl code and the presence or absence 
 of zstty in src/sys/arch/*/conf/majors.*/

 --apb (Alan Barrett)

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	ryo@nerv.org
Cc: 
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Wed, 26 Oct 2011 11:59:37 -0400

 On Oct 26,  3:55pm, apb@cequrux.com (Alan Barrett) wrote:
 -- Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over

 | The following reply was made to PR bin/45514; it has been noted by GNATS.
 | 
 | From: Alan Barrett <apb@cequrux.com>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
 | Date: Wed, 26 Oct 2011 17:52:15 +0200
 | 
 |  On Wed, 26 Oct 2011, Christos Zoulas wrote:
 |  >there are two blocks with the same pattern? How is this supposed to work?
 |  
 |  src/etc/MAKEDEV.awk removes the first block on systems that 
 |  don't have the zstty driver, based on the presence of the string 
 |  %zstty_char% in the MAKEDEV.tmpl code and the presence or absence 
 |  of zstty in src/sys/arch/*/conf/majors.*/

 A comment or two in there would not hurt :-)!

 christos

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: bin/45514: MAKEDEV doesn't create /dev/tty20 and over
Date: Thu, 27 Oct 2011 01:04:22 +0900

 > there are two blocks with the same pattern? How is this supposed to work?

 BTW, the first one is picked up anyway on ports which have both com and zs.
 (see etc/etc.cobalt/MAKEDEV.conf)

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.