Subject: Re: port-sparc/871: sparc MAKEDEV breaks on cgfour
To: None <sh391@city.ac.uk, gnats-admin@NetBSD.ORG>
From: UNIX hacker and security officer <greywolf@lonewolf.ithaca.com>
List: netbsd-bugs
Date: 03/13/1995 17:08:32
It seems to me that the sensible thing to do with regards to creating
units would be

        unit=`devunit $i`

where devunit is a shell function:

devunit () {
        expr $1 : '[^0-9]*\([0-9]*\)'
}

That way you don't have to dink around with lengths of stuff, and it's
a brain-dead snarf-and-barf operation when you add a new device to the
MAKEDEV file.

Of course, this only works with things which end in numbers, but I don't
see this as an immediate problem, as most everything which contains more
than one number is a unique device anyway (qv. SunOS' vme32d16, which
isn't present here anyway).


--
** Transporting... **
 ______________ ___   ________ _____WHO: Greywolf (unto death)
/ ___\ _ \ __\ V / \  / /__ \| | __/WHAT: UNIX System Mangler...er, Admin
\ \| |   < _| ` ' \ '` / \/ /|_| _/ WHERE: Ithaca SW,  1301 Marina Village Pkwy
 \___|_|\_\__\|_|  \/\/ \__/___/_|  Alameda, CA 94501 (415) 332-2344 x7255
"If militant monotheism is the answer, the question must be pretty stupid."