Get rid of the 'mount read: i/o on hungup channel' errors when unmounting some common file servers tapefs now without wstat() patch. -Steve Reference: /n/sources/patch/applied/grumble-on-dismount2 Date: Mon Feb 28 16:17:19 CET 2005 --- /sys/src/cmd/ramfs.c Mon Feb 28 16:14:39 2005 +++ /sys/src/cmd/ramfs.c Mon Feb 28 16:14:33 2005 @@ -745,7 +745,7 @@ void io(void) { - char *err, buf[20]; + char *err, buf[40]; int n, pid, ctl; pid = getpid(); @@ -771,6 +771,12 @@ * so we wait for the error. */ n = read9pmsg(mfd[0], mdata, messagesize); + if(n < 0){ + errstr(buf, sizeof buf); + if (buf[0]=='\0' || strncmp(buf, "i/o on hungup channel", 22)==0) + exits(""); + error("mount read"); + } if(n < 0) error("mount read"); if(n == 0) --- /sys/src/cmd/ip/ftpfs/ftpfs.c Mon Feb 28 16:15:00 2005 +++ /sys/src/cmd/ip/ftpfs/ftpfs.c Mon Feb 28 16:14:57 2005 @@ -247,15 +247,19 @@ void io(void) { - char *err; + char *err, buf[ERRMAX]; int n; kapid = kaproc(); while(!dying){ n = read9pmsg(mfd, mdata, messagesize); - if(n <= 0) - fatal("mount read"); + if(n <= 0){ + errstr(buf, sizeof buf); + if (buf[0]=='\0' || strncmp(buf, "i/o on hungup channel", 22)==0) + exits(""); + fatal("mount read: %s\n", buf); + } if(convM2S(mdata, n, &thdr) == 0) continue; --- /sys/src/cmd/tapefs/fs.c Mon Feb 28 16:15:19 2005 +++ /sys/src/cmd/tapefs/fs.c Mon Feb 28 16:15:16 2005 @@ -541,7 +541,7 @@ if(write(mfd[1], mdata, n) != n) error("mount write"); } - if (buf[0]=='\0' || strncmp(buf, "write to hung", 13)==0) + if (buf[0]=='\0' || strncmp(buf, "i/o on hungup channel", 22)==0) exits(""); fprint(2, "%s: mount read: %s\n", argv0, buf); exits(buf);