plan9fox/rc/bin/chdev

20 lines
221 B
Text
Raw Normal View History

2022-05-28 02:25:56 +00:00
#!/bin/rc
2022-05-31 19:30:23 +00:00
rfork e
2022-05-28 02:25:56 +00:00
fn usage {
echo 'usage:' $0 '[ -nr ] devmask' >[1=2]
exit usage
}
op='&'
while(~ $1 -*){
switch($1){
case -n; op='~'
case -r; op='&~'
case *; usage
}
shift
}
echo chdev $op $1 >> '#c/drivers'