Subject: misc/72: minor numbers for vn devices in etc.i386/MAKEDEV are wrong
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 01/13/1994 12:50:17
>Number:         72
>Category:       misc
>Synopsis:       minor numbers for vn devices in etc.i386/MAKEDEV are wrong
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 13 12:50:10 1994
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        
>Environment:
    	
System: NetBSD ed209 0.9a ED209#0 i386

Machine: i386
>Description:
	The minor numbers for vn devices in etc.i386/MAKEDEV are wrong.
	The vn driver uses the same numbering scheme as the disk
	drivers (i.e. the lower 3 bits are for the partition).
	The '+ 2' in the fix below is superfluous since the vn driver
	ignores the lower 3 bits.  I've added it just for consistency
	with the c partitions of real disks.
>How-To-Repeat:
	
>Fix:
*** MAKEDEV-	Tue Jan 11 11:22:51 1994
--- MAKEDEV	Thu Jan 13 21:28:02 1994
***************
*** 260,267 ****
  vnd*)
  	umask 2 ; unit=`expr $i : '...\(.*\)'`
  	name=vnd; blk=14; chr=41
! 	mknod ${name}${unit}c	b $blk $unit
! 	mknod r${name}${unit}c	c $chr $unit
  	chown root.operator ${name}${unit}c r${name}${unit}c
  	chmod 640 ${name}${unit}c r${name}${unit}c
  	umask 77
--- 260,268 ----
  vnd*)
  	umask 2 ; unit=`expr $i : '...\(.*\)'`
  	name=vnd; blk=14; chr=41
! 	rm -f ${name}${unit}c r${name}${unit}c
! 	mknod ${name}${unit}c	b $blk `expr $unit '*' 8 + 2`
! 	mknod r${name}${unit}c	c $chr `expr $unit '*' 8 + 2`
  	chown root.operator ${name}${unit}c r${name}${unit}c
  	chmod 640 ${name}${unit}c r${name}${unit}c
  	umask 77
>Audit-Trail:
>Unformatted:

------------------------------------------------------------------------------