changed dev/rmdev to attach/detach, fixed nusbrc

This commit is contained in:
aiju 2011-07-30 16:28:45 +02:00
parent 54ed5417a9
commit 2ba1b4c476
2 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ if(! nusb/usbd)
@{
rfork ne
fn dev {
fn attach {
switch($4){
case *03
nusb/kb $1
@ -16,8 +16,8 @@ if(! nusb/usbd)
nusb/disk $1
}
}
fn rmdev {
rm -f '#σc/usb/'*'-'^$2
fn detach {
rm '#σc/usb/'*'-'^$1
}
rc < '#σ/usb/usbevent' &
}

View file

@ -208,7 +208,7 @@ formatdev(Dev *d, int type)
Usbdev *u;
u = d->usb;
return smprint("%s %d %.4x %.4x %.8lx\n", type ? "rmdev" : "dev", d->id, u->vid, u->did, u->csp);
return smprint("%s %d %.4x %.4x %.8lx\n", type ? "detach" : "attach", d->id, u->vid, u->did, u->csp);
}
static void