diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-28 18:11:04 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-06-28 18:11:04 +0200 |
| commit | 7d9339f75e21ccfaae85b8d460748412831d1e4d (patch) | |
| tree | 986afee67aba13e00348aadc8f9da22d745af046 /rc | |
| parent | 9d30b0f32dd9d8219805ed0d3ef04605c5f461cf (diff) | |
| parent | 4275c49e72544d5b92512e41ddecbd6af5bee6c3 (diff) | |
| download | plan9front-7d9339f75e21ccfaae85b8d460748412831d1e4d.tar.xz | |
merge
Diffstat (limited to 'rc')
| -rwxr-xr-x | rc/bin/nusbrc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/rc/bin/nusbrc b/rc/bin/nusbrc index 546803a4b..1bff5073b 100755 --- a/rc/bin/nusbrc +++ b/rc/bin/nusbrc @@ -7,22 +7,25 @@ if(! bind -a '#u' /dev) @{ rfork ne fn attach { + id=$1 + if(~ $#* 5 && ! test -e /env/nousbhname) + id=$1:$5 switch($4){ case *01 - nusb/audio $1 + nusb/audio $id case *02 # serial and ethernet - nusb/serial $1 + nusb/serial $id # handled /sys/src/9/boot/nusbrc - # nusb/ether $1 + # nusb/ether $id case *03 # handled /sys/src/9/boot/nusbrc - # nusb/kb $1 + # nusb/kb $id case *08 # handled /sys/src/9/boot/nusbrc - # nusb/disk $1 - case *10106 - nusb/ptp $1 + # nusb/disk $id + case 010106 + nusb/ptp $id } } fn detach { |
