MAKEDEV.mi (19d33c47) | MAKEDEV.mi (30d6f335) |
---|---|
1include(MAKEDEV.sub)dnl 2dnl | 1include(MAKEDEV.sub)dnl 2dnl |
3vers(a,{-$OpenBSD: MAKEDEV.mi,v 1.4 2002/01/07 06:13:30 todd Exp $-})dnl | 3vers(a,{-$OpenBSD: MAKEDEV.mi,v 1.5 2002/01/07 06:25:32 todd Exp $-})dnl |
4dnl 5divert(1)dnl 6{-#-} 7{-#-} Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org> 8{-#-} All rights reserved. 9{-#-} 10{-#-} Redistribution and use in source and binary forms, with or without 11{-#-} modification, are permitted provided that the following conditions --- 558 unchanged lines hidden (view full) --- 570_mcdev(bktr,bktr*,bktr,{-major_bktr_c-},644)dnl 571__devitem(tuner,tuner*,tuner device)dnl 572_mkdev(tuner,tuner*,{-M tuner$U c major_tuner_c Add(Mult($U,2),16) 644-},644)dnl 573_mkdev(local,local,{-test -s $T.local && sh $T.local-},666)dnl 574dnl 575divert(1)dnl 576include(etc.MACHINE/MAKEDEV.md)dnl 577dnl | 4dnl 5divert(1)dnl 6{-#-} 7{-#-} Copyright (c) 2001 Todd T. Fries <todd@OpenBSD.org> 8{-#-} All rights reserved. 9{-#-} 10{-#-} Redistribution and use in source and binary forms, with or without 11{-#-} modification, are permitted provided that the following conditions --- 558 unchanged lines hidden (view full) --- 570_mcdev(bktr,bktr*,bktr,{-major_bktr_c-},644)dnl 571__devitem(tuner,tuner*,tuner device)dnl 572_mkdev(tuner,tuner*,{-M tuner$U c major_tuner_c Add(Mult($U,2),16) 644-},644)dnl 573_mkdev(local,local,{-test -s $T.local && sh $T.local-},666)dnl 574dnl 575divert(1)dnl 576include(etc.MACHINE/MAKEDEV.md)dnl 577dnl |
578dnl define DISK_STEPPING in the above file if other than 16 | |
579dnl | 578dnl |
580ifdef({-DISK_STEPPING-},,{-define({-DISK_STEPPING-},{-16-})-})dnl 581dnl | |
582divert(0)dnl 583#!/bin/sh - 584# 585# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. 586# generated from: 587# 588show_vers()dnl <-- now that all files are included, show versions 589# --- 40 unchanged lines hidden (view full) --- 630 do 631 arg=$tmp 632 tmp="${arg#[a-zA-Z]*}" 633 tmp="${tmp%*[a-zA-Z]}" 634 done 635 echo $arg 636} 637dnl | 579divert(0)dnl 580#!/bin/sh - 581# 582# THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. 583# generated from: 584# 585show_vers()dnl <-- now that all files are included, show versions 586# --- 40 unchanged lines hidden (view full) --- 627 do 628 arg=$tmp 629 tmp="${arg#[a-zA-Z]*}" 630 tmp="${tmp%*[a-zA-Z]}" 631 done 632 echo $arg 633} 634dnl |
638dnl dodisk(name,unit,blkmaj,chrmaj,unit,off) | 635dnl dodisk(name,unit,blkmaj,chrmaj,unit,off[,stepping]) 636dnl arg: 1 2 3 4 5 6 7 |
639dnl 640dodisk() 641{ | 637dnl 638dodisk() 639{ |
642 n=Add(Mult(${5},DISK_STEPPING),${6}) count=0 | 640 n=Add(Mult(${5},${7:-16}),${6}) count=0 |
643 RMlist="$RMlist {-$-}1{-$-}2? r{-$-}1{-$-}2?" 644 for d in a b c d e f g h i j k l m n o p 645 do 646 M {-$-}1{-$-}2$d b {-$-}3 Add($n,$count) 640 647 M r{-$-}1{-$-}2$d c {-$-}4 Add($n,$count) 640 648 let count=count+1 649 done 650 MKlist="$MKlist;chown root.operator {-$-}1{-$-}2? r{-$-}1{-$-}2?" 651} 652dnl | 641 RMlist="$RMlist {-$-}1{-$-}2? r{-$-}1{-$-}2?" 642 for d in a b c d e f g h i j k l m n o p 643 do 644 M {-$-}1{-$-}2$d b {-$-}3 Add($n,$count) 640 645 M r{-$-}1{-$-}2$d c {-$-}4 Add($n,$count) 640 646 let count=count+1 647 done 648 MKlist="$MKlist;chown root.operator {-$-}1{-$-}2? r{-$-}1{-$-}2?" 649} 650dnl |
653dnl dodisk2(name,unit,blkmaj,chrmaj,unit,off) | 651dnl dodisk2(name,unit,blkmaj,chrmaj,unit,off[,stepping]) |
654dnl 655dnl 1. name - prefix name of the device 656dnl 2. unit - beginning unit number for block devices 657dnl 3. blkmaj - block device major number 658dnl 4. chrmaj - character device major number 659dnl 5. unit - beginning unit number for character devices 660dnl 6. off - offset from 0 for all minor numbers (see svnd for an example) | 652dnl 653dnl 1. name - prefix name of the device 654dnl 2. unit - beginning unit number for block devices 655dnl 3. blkmaj - block device major number 656dnl 4. chrmaj - character device major number 657dnl 5. unit - beginning unit number for character devices 658dnl 6. off - offset from 0 for all minor numbers (see svnd for an example) |
659dnl 7. step - optional, defaults to 16, number of partitions per device |
|
661dnl 662dodisk2() 663{ | 660dnl 661dodisk2() 662{ |
664 n=Add(Mult({-$-}5,DISK_STEPPING),{-$-}6) | 663 n=Add(Mult({-$-}5,${7:-16}),{-$-}6) |
665 M {-$-}1{-$-}2a b {-$-}3 $n 640 operator 666 M r{-$-}1{-$-}2a c {-$-}4 $n 640 operator 667 n=Add($n,2) 668 M {-$-}1{-$-}2c b {-$-}3 $n 640 operator 669 M r{-$-}1{-$-}2c c {-$-}4 $n 640 operator 670} 671 672# M name b/c major minor [mode] [group] --- 95 unchanged lines hidden --- | 664 M {-$-}1{-$-}2a b {-$-}3 $n 640 operator 665 M r{-$-}1{-$-}2a c {-$-}4 $n 640 operator 666 n=Add($n,2) 667 M {-$-}1{-$-}2c b {-$-}3 $n 640 operator 668 M r{-$-}1{-$-}2c c {-$-}4 $n 640 operator 669} 670 671# M name b/c major minor [mode] [group] --- 95 unchanged lines hidden --- |