
instead of naming devices by ther dynamically assigned device address, we hash device uniqueue fields from the device descriptor and produce a 5 digit hex string that will identify the device across machines. when there is a collision (less than 1% chance with 100 devices), usbd will append the device address to the name to make it uniqueue for this machine. the hname is passed to drivers in the devid argument, which now has the form addr:hname, where the colon and hname can be omited (for backwards compatibility). when the new behaviour isnt desired, nousbhname= environment variable can be defined giving the old behaviour.
35 lines
693 B
Text
35 lines
693 B
Text
.TH NUSBRC 8
|
|
.SH NAME
|
|
nusbrc - Universal Serial Bus startup script
|
|
.SH SYNOPSIS
|
|
.B nusbrc
|
|
.SH DESCRIPTION
|
|
Started by
|
|
.I bootrc
|
|
(see
|
|
.IR boot (8)),
|
|
.I termrc
|
|
or
|
|
.I cpurc
|
|
(see
|
|
.IR cpurc (8)),
|
|
.I nusbrc
|
|
handles the startup and shutdown of usb drivers on physical
|
|
device attach and detach events by reading
|
|
.B /dev/usbevent
|
|
file.
|
|
.SH SOURCE
|
|
.B /rc/bin/nusbrc
|
|
.B /sys/src/9/boot/nusbrc
|
|
.SH "SEE ALSO"
|
|
.IR nusb (4)
|
|
.SH BUGS
|
|
Usb devices appear as files under
|
|
.B /dev
|
|
and
|
|
.B /shr
|
|
identified by the devices uniqueue name assigned by usbd.
|
|
When the environment variable
|
|
.I nousbhname
|
|
is defined, devies are named by ther dynamically assigned
|
|
usb device address instead. This emulates the old behaviour.
|