Change to use some unused bits in the 'type' field to extend the unit field
to 9 bits (512 units) for disk devices.
This commit is contained in:
parent
c2f69d249e
commit
ac9e2a2511
12
etc/MAKEDEV
12
etc/MAKEDEV
@ -134,7 +134,7 @@ dkitos() {
|
||||
# Convert disk (type, unit, slice, partition) to minor number
|
||||
dkminor()
|
||||
{
|
||||
echo $((32 * 65536 * $1 + 8 * $2 + 65536 * $3 + $4))
|
||||
echo $((512 * 65536 * $1 + $2 / 32 * 2097152 + $2 % 32 * 8 + 65536 * $3 + $4))
|
||||
}
|
||||
|
||||
# Convert the last character of a tty name to a minor number.
|
||||
@ -260,7 +260,7 @@ od*s*|sd*s*|vn*s*|wd*s*)
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
@ -420,7 +420,7 @@ od*|sd*|vn*|wd*)
|
||||
esac
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
for slicepartname in s0h s1 s2 s3 s4
|
||||
do
|
||||
sh MAKEDEV $name$unit$slicepartname
|
||||
@ -428,7 +428,7 @@ od*|sd*|vn*|wd*)
|
||||
case $name in
|
||||
od|sd)
|
||||
rm -f r${name}${unit}.ctl
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit / 32 '*' 2097152 + $unit % 32 '*' 8 + $scsictl `
|
||||
chmod 600 r${name}${unit}.ctl
|
||||
;;
|
||||
esac
|
||||
@ -446,9 +446,9 @@ ccd*)
|
||||
blk=21; chr=74
|
||||
unit=`expr $i : '...\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
rm -f r${name}${unit}.ctl
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit / 32 '*' 2097152 + $unit % 32 '*' 8 + $scsictl `
|
||||
chmod 600 r${name}${unit}.ctl
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
|
@ -134,7 +134,7 @@ dkitos() {
|
||||
# Convert disk (type, unit, slice, partition) to minor number
|
||||
dkminor()
|
||||
{
|
||||
echo $((32 * 65536 * $1 + 8 * $2 + 65536 * $3 + $4))
|
||||
echo $((512 * 65536 * $1 + $2 / 32 * 2097152 + $2 % 32 * 8 + 65536 * $3 + $4))
|
||||
}
|
||||
|
||||
# Convert the last character of a tty name to a minor number.
|
||||
@ -260,7 +260,7 @@ od*s*|sd*s*|vn*s*|wd*s*)
|
||||
slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
|
||||
part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
case $slice in
|
||||
[0-9]|[1-2][0-9]|30)
|
||||
oldslice=$slice
|
||||
@ -420,7 +420,7 @@ od*|sd*|vn*|wd*)
|
||||
esac
|
||||
unit=`expr $i : '..\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
for slicepartname in s0h s1 s2 s3 s4
|
||||
do
|
||||
sh MAKEDEV $name$unit$slicepartname
|
||||
@ -428,7 +428,7 @@ od*|sd*|vn*|wd*)
|
||||
case $name in
|
||||
od|sd)
|
||||
rm -f r${name}${unit}.ctl
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit / 32 '*' 2097152 + $unit % 32 '*' 8 + $scsictl `
|
||||
chmod 600 r${name}${unit}.ctl
|
||||
;;
|
||||
esac
|
||||
@ -446,9 +446,9 @@ ccd*)
|
||||
blk=21; chr=74
|
||||
unit=`expr $i : '...\(.*\)'`
|
||||
case $unit in
|
||||
[0-9]|[1-2][0-9]|30|31)
|
||||
[0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
|
||||
rm -f r${name}${unit}.ctl
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
|
||||
mknod r${name}${unit}.ctl c $chr `expr $unit / 32 '*' 2097152 + $unit % 32 '*' 8 + $scsictl `
|
||||
chmod 600 r${name}${unit}.ctl
|
||||
for part in 0 1 2 3 4 5 6 7
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user