summaryrefslogtreecommitdiff
path: root/etc/MAKEDEV.sub
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-01-07 06:54:11 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-01-07 06:54:11 +0000
commita82e9d1c30d4e81d94fd3b2942031ab649cc586e (patch)
tree187ed0c42a97dbb37042f0617f40fe2c232647d8 /etc/MAKEDEV.sub
parentad0914ec35309c189af92ee167de06595fb9b9b0 (diff)
sprinklings of 'ifstep()'
'the big disk case' no longer sets vars and calls dodisk, would take more space to additionally do the 'stepping' argument (see cd\* in generated MAKEDEV)
Diffstat (limited to 'etc/MAKEDEV.sub')
-rw-r--r--etc/MAKEDEV.sub16
1 files changed, 10 insertions, 6 deletions
diff --git a/etc/MAKEDEV.sub b/etc/MAKEDEV.sub
index a46893e5756..ef6e5a27759 100644
--- a/etc/MAKEDEV.sub
+++ b/etc/MAKEDEV.sub
@@ -1,4 +1,4 @@
-dnl $OpenBSD: MAKEDEV.sub,v 1.3 2002/01/07 06:25:32 todd Exp $
+dnl $OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 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.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 example1: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp $-})
+dnl example2: vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 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.3 2002/01/07 06:25:32 todd Exp $-})dnl
+vers(__file__,{-$OpenBSD: MAKEDEV.sub,v 1.4 2002/01/07 06:54:10 todd Exp $-})dnl
dnl
dnl
define({-_addsubdir-},
@@ -186,6 +186,10 @@ dnl _DEV 'ifelse' .. $3 - major_$1_b
dnl
ifelse($3,,,{-define(major_$1_b,$3)-})dnl
dnl
+dnl _DEV 'ifelse' .. $4 - step_$1
+dnl
+ifelse($4,,,{-define(step_$1,{-$4-})-})dnl
+dnl
dnl Some magic here, defining a devitem also defines another
dnl string so that later we can check if a particular devitem was
dnl defined, and thus determine if the devices themselves are to
@@ -244,7 +248,7 @@ dnl for showing disks
dnl
define({-CasE-},
{-ifdev({-$1-},
-{- $1*) n=$1 b=major_$1_b c=major_$1_c;;
+{- $1*) dodisk $1 $U major_$1_b major_$1_c $U 0{--}ifstep($1);;
-})-})dnl
dnl
dnl
@@ -302,4 +306,4 @@ 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
+define({-ifstep-},{-ifdef({-step_$1-},{- -}step_$1{--})-})dnl