delete plumbing code from nix boot. unsure why it was there. Reference: /n/atom/patch/applied/bootnoplumb Date: Thu Jan 2 15:56:35 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/nix/boot/boot.h Thu Jan 2 15:55:48 2014 +++ /sys/src/nix/boot/boot.h Thu Jan 2 15:55:48 2014 @@ -33,10 +33,8 @@ extern void getpasswd(char*, int); extern void key(int, Method*); extern int outin(char*, char*, int); -extern int plumb(char*, char*, int*, char*); extern int readfile(char*, char*, int); extern void run(char *file, ...); -extern int sendmsg(int, char*); extern void setenv(char*, char*); extern void settime(int, int, char*); extern void srvcreate(char*, int); --- /sys/src/nix/boot/aux.c Thu Jan 2 15:55:49 2014 +++ /sys/src/nix/boot/aux.c Thu Jan 2 15:55:49 2014 @@ -2,57 +2,6 @@ #include #include <../boot/boot.h> -/* -int -plumb(char *dir, char *dest, int *efd, char *here) -{ - char buf[128]; - char name[128]; - int n; - - sprint(name, "%s/clone", dir); - efd[0] = open(name, ORDWR); - if(efd[0] < 0) - return -1; - n = read(efd[0], buf, sizeof(buf)-1); - if(n < 0){ - close(efd[0]); - return -1; - } - buf[n] = 0; - sprint(name, "%s/%s/data", dir, buf); - if(here){ - sprint(buf, "announce %s", here); - if(sendmsg(efd[0], buf) < 0){ - close(efd[0]); - return -1; - } - } - sprint(buf, "connect %s", dest); - if(sendmsg(efd[0], buf) < 0){ - close(efd[0]); - return -1; - } - efd[1] = open(name, ORDWR); - if(efd[1] < 0){ - close(efd[0]); - return -1; - } - return efd[1]; -} - */ - -int -sendmsg(int fd, char *msg) -{ - int n; - - n = strlen(msg); - if(write(fd, msg, n) != n) - return -1; - return 0; -} - void warning(char *s) { @@ -160,14 +109,14 @@ if(len >= sizeof buf) len = sizeof(buf)-1; - if(cpuflag){ + if(cpuflag && *def != 0){ notify(catchint); alarm(15*1000); } print("%s[%s]: ", prompt, *def ? def : "no default"); memset(buf, 0, sizeof buf); n = read(0, buf, len); - if(cpuflag){ + if(cpuflag && *def != 0){ alarm(0); notify(0); }