diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2002-01-07 06:25:33 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2002-01-07 06:25:33 +0000 |
commit | 2e7ad86be7695e1576aa19b76ba5ded9bfcff031 (patch) | |
tree | 817d7d7f14074c1413d95d62cb1671fd68b2547f | |
parent | 99e1e2713ac5378ad65e5d84a2abcce95c63462d (diff) |
DISK_STEPPING is not used, and in any event, is not global to all disks
prepare dodisk* script functions for a 7th argument, what I call disk stepping,
the number to add from rd0a to rd1a minor numbers, defaulted to 16; some archs
*cough*macppc*cough* still have 8 for cdroms and such
-rw-r--r-- | etc/MAKEDEV.mi | 15 | ||||
-rw-r--r-- | etc/MAKEDEV.sub | 13 |
2 files changed, 16 insertions, 12 deletions
diff --git a/etc/MAKEDEV.mi b/etc/MAKEDEV.mi index 388fa85e426..94d97de3a2c 100644 --- a/etc/MAKEDEV.mi +++ b/etc/MAKEDEV.mi @@ -1,6 +1,6 @@ include(MAKEDEV.sub)dnl dnl -vers(a,{-$OpenBSD: MAKEDEV.mi,v 1.4 2002/01/07 06:13:30 todd Exp $-})dnl +vers(a,{-$OpenBSD: MAKEDEV.mi,v 1.5 2002/01/07 06:25:32 todd Exp $-})dnl dnl divert(1)dnl {-#-} @@ -575,9 +575,6 @@ dnl divert(1)dnl include(etc.MACHINE/MAKEDEV.md)dnl dnl -dnl define DISK_STEPPING in the above file if other than 16 -dnl -ifdef({-DISK_STEPPING-},,{-define({-DISK_STEPPING-},{-16-})-})dnl dnl divert(0)dnl #!/bin/sh - @@ -635,11 +632,12 @@ unt() echo $arg } dnl -dnl dodisk(name,unit,blkmaj,chrmaj,unit,off) +dnl dodisk(name,unit,blkmaj,chrmaj,unit,off[,stepping]) +dnl arg: 1 2 3 4 5 6 7 dnl dodisk() { - n=Add(Mult(${5},DISK_STEPPING),${6}) count=0 + n=Add(Mult(${5},${7:-16}),${6}) count=0 RMlist="$RMlist {-$-}1{-$-}2? r{-$-}1{-$-}2?" for d in a b c d e f g h i j k l m n o p do @@ -650,7 +648,7 @@ dodisk() MKlist="$MKlist;chown root.operator {-$-}1{-$-}2? r{-$-}1{-$-}2?" } dnl -dnl dodisk2(name,unit,blkmaj,chrmaj,unit,off) +dnl dodisk2(name,unit,blkmaj,chrmaj,unit,off[,stepping]) dnl dnl 1. name - prefix name of the device dnl 2. unit - beginning unit number for block devices @@ -658,10 +656,11 @@ dnl 3. blkmaj - block device major number dnl 4. chrmaj - character device major number dnl 5. unit - beginning unit number for character devices dnl 6. off - offset from 0 for all minor numbers (see svnd for an example) +dnl 7. step - optional, defaults to 16, number of partitions per device dnl dodisk2() { - n=Add(Mult({-$-}5,DISK_STEPPING),{-$-}6) + n=Add(Mult({-$-}5,${7:-16}),{-$-}6) M {-$-}1{-$-}2a b {-$-}3 $n 640 operator M r{-$-}1{-$-}2a c {-$-}4 $n 640 operator n=Add($n,2) diff --git a/etc/MAKEDEV.sub b/etc/MAKEDEV.sub index 7c5511b494e..a46893e5756 100644 --- a/etc/MAKEDEV.sub +++ b/etc/MAKEDEV.sub @@ -1,4 +1,4 @@ -dnl $OpenBSD: MAKEDEV.sub,v 1.2 2002/01/07 06:06:40 todd Exp $ +dnl $OpenBSD: MAKEDEV.sub,v 1.3 2002/01/07 06:25:32 todd Exp $ dnl dnl Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org> dnl All rights reserved. @@ -74,8 +74,8 @@ dnl store a version string for 'this' file dnl dnl vers ( uniqueidstring, versionstring, subdir ) dnl -dnl example1: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.2 2002/01/07 06:06:40 todd Exp $-}) -dnl example2: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.2 2002/01/07 06:06:40 todd Exp $-},etc.MACHINE) +dnl example1: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.3 2002/01/07 06:25:32 todd Exp $-}) +dnl example2: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.3 2002/01/07 06:25:32 todd Exp $-},etc.MACHINE) dnl dnl if subdir is defined, prepend it to the filename in the version string dnl @@ -86,7 +86,7 @@ define({-vers-}, dnl dnl Version info for this file: dnl -vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.2 2002/01/07 06:06:40 todd Exp $-})dnl +vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.3 2002/01/07 06:25:32 todd Exp $-})dnl dnl dnl define({-_addsubdir-}, @@ -298,3 +298,8 @@ dnl undefined at the end dnl _di -> 'iteration' string .. the string used in this iteration, is empty if dnl the device does not exist dnl +dnl +dnl ifstep(devstr) +dnl .. if stepping is defined for the particular device, emit ' step', else +dnl nothing +define({-ifstep-},{-ifdef({-step_$1-},{- -}step_$1)-})dnl |