drm: disable encoders before re-routing them
[linux-2.6-block.git] / Documentation / aoe / mkshelf.sh
CommitLineData
1da177e4
LT
1#! /bin/sh
2
3if test "$#" != "2"; then
4 echo "Usage: sh `basename $0` {dir} {shelfaddress}" 1>&2
d098840e 5 echo " n_partitions=16 sh `basename $0` {dir} {shelfaddress}" 1>&2
1da177e4
LT
6 exit 1
7fi
8n_partitions=${n_partitions:-16}
9dir=$1
10shelf=$2
e39526e6
EC
11nslots=16
12maxslot=`echo $nslots 1 - p | dc`
1da177e4
LT
13MAJOR=152
14
15set -e
16
e39526e6 17minor=`echo $nslots \* $shelf \* $n_partitions | bc`
1da177e4 18endp=`echo $n_partitions - 1 | bc`
e39526e6 19for slot in `seq 0 $maxslot`; do
1da177e4
LT
20 for part in `seq 0 $endp`; do
21 name=e$shelf.$slot
22 test "$part" != "0" && name=${name}p$part
23 rm -f $dir/$name
24 mknod -m 0660 $dir/$name b $MAJOR $minor
25
26 minor=`expr $minor + 1`
27 done
28done