# HG changeset patch # User Erik Quanstrom # Date 1328654303 0 # Node ID c2be16aef0824eb138f4133a740ccfae3ca669a9 # Parent 53a188a2abee255f4ba5a10371c6056e56cef1b1 remove old9p from cpu.c old9p in this context means code to interoperate with pre-9p2000 servers. R=nixiedev, noah.evans, quanstro, nemo, john CC=nix-dev http://codereview.appspot.com/5435045 Committer: John Floren diff -r 53a188a2abee -r c2be16aef082 sys/src/cmd/cpu.c --- a/sys/src/cmd/cpu.c Tue Feb 07 22:36:49 2012 +0000 +++ b/sys/src/cmd/cpu.c Tue Feb 07 22:38:23 2012 +0000 @@ -15,7 +15,7 @@ #define Maxfdata 8192 #define MaxStr 128 -void remoteside(int); +void remoteside(void); void fatal(int, char*, ...); void lclnoteproc(int); void rmtnoteproc(void); @@ -171,10 +171,6 @@ case 'f': /* ignored but accepted for compatibility */ break; - case 'O': - p9authproto = "p9sk2"; - remoteside(1); /* From listen */ - break; case 'R': /* From listen */ remoteside(0); break; @@ -287,47 +283,9 @@ char bug[256]; -int -old9p(int fd) -{ - int p[2]; - - if(pipe(p) < 0) - fatal(1, "pipe"); - - switch(rfork(RFPROC|RFFDG|RFNAMEG)) { - case -1: - fatal(1, "rfork srvold9p"); - case 0: - if(fd != 1){ - dup(fd, 1); - close(fd); - } - if(p[0] != 0){ - dup(p[0], 0); - close(p[0]); - } - close(p[1]); - if(0){ - fd = open("/sys/log/cpu", OWRITE); - if(fd != 2){ - dup(fd, 2); - close(fd); - } - execl("/bin/srvold9p", "srvold9p", "-ds", nil); - } else - execl("/bin/srvold9p", "srvold9p", "-s", nil); - fatal(1, "exec srvold9p"); - default: - close(fd); - close(p[0]); - } - return p[1]; -} - /* Invoked with stdin, stdout and stderr connected to the network connection */ void -remoteside(int old) +remoteside(void) { char user[MaxStr], home[MaxStr], buf[MaxStr], xdir[MaxStr], cmd[MaxStr]; int i, n, fd, badchdir, gotcmd; @@ -384,9 +342,6 @@ if(n != 2 || buf[0] != 'O' || buf[1] != 'K') exits("remote tree"); - if(old) - fd = old9p(fd); - /* make sure buffers are big by doing fversion explicitly; pick a huge number; other side will trim */ strcpy(buf, VERSION9P); if(fversion(fd, 64*1024, buf, sizeof buf) < 0)