noticed during a vbox trial. it may be that usbd will not start for legit reasons, such as no hubs. don't panic, keep going. Reference: /n/atom/patch/applied/nixnousb Date: Tue Apr 8 17:19:31 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/boot/boot.c Tue Apr 8 17:17:58 2014 +++ /sys/src/nix/boot/boot.c Tue Apr 8 17:17:59 2014 @@ -293,7 +293,7 @@ if(access("#u/usb/ctl", 0) >= 0 && bind("#u", "/dev", MAFTER) >= 0 && access(usbd, AEXIST) >= 0){ - run(usbd, "-m", "/dev", nil); + run(0, usbd, "-m", "/dev", nil); /* may fail if no hubs */ s = getenv("drive0"); if(s != nil && strstr(s, " usb=") != nil) usbbootdrive(); --- /sys/src/nix/boot/boot.h Tue Apr 8 17:18:00 2014 +++ /sys/src/nix/boot/boot.h Tue Apr 8 17:18:01 2014 @@ -34,7 +34,7 @@ extern void key(int, Method*); extern int outin(char*, char*, int); extern int readfile(char*, char*, int); -extern void run(char *file, ...); +extern void run(int, char*, ...); extern void setenv(char*, char*); extern void settime(int, int, char*); extern void srvcreate(char*, int); --- /sys/src/nix/boot/bootauth.c Tue Apr 8 17:18:02 2014 +++ /sys/src/nix/boot/bootauth.c Tue Apr 8 17:18:02 2014 @@ -49,9 +49,6 @@ /* wait for agent to really be there */ while(access("/mnt/factotum", 0) < 0) sleep(250); - - if(cpuflag) - return; } static void --- /sys/src/nix/boot/local.c Tue Apr 8 17:18:03 2014 +++ /sys/src/nix/boot/local.c Tue Apr 8 17:18:04 2014 @@ -118,7 +118,7 @@ } void -run(char *file, ...) +run(int must, char *file, ...) { int i, pid; @@ -131,7 +131,7 @@ default: while ((i = waitpid()) != pid && i != -1) ; - if(i == -1) + if(must && i == -1) fatal(smprint("wait failed running %s", file)); } } @@ -212,7 +212,7 @@ f[2] = "tcp!127.1!8000"; } configloopback(); - run("/boot/venti", "-c", f[0], "-a", f[1], "-h", f[2], nil); + run(1, "/boot/venti", "-c", f[0], "-a", f[1], "-h", f[2], nil); /* * If the announce address is tcp!*!foo, then set * $venti to tcp!127.1!foo instead, which is actually dialable. @@ -233,7 +233,7 @@ /* start fossil */ print("fossil(%s)...", partition); - run("/boot/fossil", "-f", partition, "-c", "srv -A fboot", "-c", "srv -p fscons", nil); + run(1, "/boot/fossil", "-f", partition, "-c", "srv -A fboot", "-c", "srv -p fscons", nil); fd = open("#s/fboot", ORDWR); if(fd < 0){ print("open #s/fboot: %r\n");