Chan* chaninit(char *server) { Chan *cp; char buf[3*NAMELEN]; int p[2]; // P9P demands we strip the #s stuff sprint(buf, "#s/%s", server); if(sfd < 0){ if(pipe(p) < 0) panic("can't make a pipe"); sfd = p[0]; rfd = p[1]; } // Replace as per 9660srv code in p9p srvfd(buf, 0666, sfd); close(sfd); cp = ialloc(sizeof *cp); cons.srvchan = cp; dochaninit(cp, rfd); return cp; }