--- /n/sources/plan9/sys/src/cmd/cpu.c Thu Jul 22 22:25:23 2010 +++ /sys/src/cmd/cpu.c Sun Feb 28 00:00:00 2016 @@ -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,12 +171,8 @@ case 'f': /* ignored but accepted for compatibility */ break; - case 'O': - p9authproto = "p9sk2"; - remoteside(1); /* From listen */ - break; case 'R': /* From listen */ - remoteside(0); + remoteside(); break; case 'h': system = EARGF(usage()); @@ -285,49 +281,9 @@ char *negstr = "negotiating authentication method"; -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 +340,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) --- /n/sources/plan9/sys/man/1/cpu Sun Dec 2 23:42:11 2007 +++ /sys/man/1/cpu Sun Feb 28 00:00:00 2016 @@ -29,8 +29,6 @@ .B cpu [ .B -R -| -.B -O ] .SH DESCRIPTION .I Cpu @@ -170,12 +168,6 @@ to run the server (remote) side of the protocol. It is run from service files such as .BR /bin/service/tcp17010 . -The -.B -O -flag is similar but simulates the pre-9P2000 version -of the -.I cpu -protocol. .SH FILES The name space of the terminal side of the .I cpu