]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/nusbrc
acid: fix dumptree() acid function to work in kernel debug, update malloc.acid and...
[plan9front.git] / rc / bin / nusbrc
1 #!/bin/rc
2
3 if(! test -e '#σ/usb/usbevent')
4         exit
5 if(! bind -a '#u' /dev)
6         exit
7 @{
8         rfork ne
9         fn attach {
10                 switch($4){
11                 case *01
12                         nusb/audio $1
13                 case *02
14                         # serial and ethernet
15                         nusb/serial $1
16                         # handled /sys/src/9/boot/nusbrc
17                         # nusb/ether $1
18                 case *03
19                         # handled /sys/src/9/boot/nusbrc
20                         # nusb/kb $1
21                 case *08
22                         # handled /sys/src/9/boot/nusbrc
23                         # nusb/disk $1
24                 case *10106
25                         nusb/ptp $1
26                 }
27         }
28         fn detach {
29                 # handled /sys/src/9/boot/nusbrc
30         }
31         rc < '#σ/usb/usbevent' &
32 }
33
34 bind -qa '#σ/usb' /dev
35 bind -qa '#σ/usbnet' /net