When making devices for the ramdisk, instead of making character

devices for CD-ROMs, which aren't useful on the ramdisk, make
block devices instead.  This makes it easier to boot a CD-ROM
and install a miniroot from same.
This commit is contained in:
fredette 2002-06-17 13:30:39 +00:00
parent fbb91339a2
commit 82e3b21cfd
2 changed files with 16 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.12 2002/04/22 21:09:14 fredette Exp $
# $NetBSD: MAKEDEV,v 1.13 2002/06/17 13:30:39 fredette Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -75,8 +75,9 @@ umask 77
eo=
# when we're making devices for the ramdisk, we conserve
# inodes by not making block devices or devices for
# partitions greater than d:
# inodes by not making block devices for disks, character
# devices for CD-ROMs, or any device for a partition greater
# than d:
__ramdisk=false
# mk name b/c major minor [mode] [group]
@ -227,10 +228,12 @@ ccd*|cd*|fd*|sd*|xd*|xy*|vnd*|raid*)
set -- $part
IFS="$tmp" ; unset tmp
minor=$(($offset + $2))
if ! $__ramdisk; then
if ! $__ramdisk || test $name = cd; then
mk $name$unit$1 b $blk $minor 640 operator
fi
mk r$name$unit$1 c $chr $minor 640 operator
if ! $__ramdisk || test $name != cd; then
mk r$name$unit$1 c $chr $minor 640 operator
fi
)
done
;;

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: MAKEDEV,v 1.43 2002/05/17 16:32:18 lukem Exp $
# $NetBSD: MAKEDEV,v 1.44 2002/06/17 13:30:39 fredette Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -76,8 +76,9 @@ umask 77
eo=
# when we're making devices for the ramdisk, we conserve
# inodes by not making block devices or devices for
# partitions greater than d:
# inodes by not making block devices for disks, character
# devices for CD-ROMs, or any device for a partition greater
# than d:
__ramdisk=false
# mk name b/c major minor [mode] [group]
@ -247,10 +248,12 @@ ccd*|cd*|fd*|sd*|xd*|xy*|vnd*|raid*)
set -- $part
IFS="$tmp" ; unset tmp
minor=$(($offset + $2))
if ! $__ramdisk; then
if ! $__ramdisk || test $name = cd; then
mk $name$unit$1 b $blk $minor 640 operator
fi
mk r$name$unit$1 c $chr $minor 640 operator
if ! $__ramdisk || test $name != cd; then
mk r$name$unit$1 c $chr $minor 640 operator
fi
)
done
;;