| plan 9 kernel history: overview | file list | diff list |
boot/nopsession.c (diff list | history)
| 1992/0318/sys/src/9/boot/nopsession.c:4,56 – 1992/0319/sys/src/9/boot/nopsession.c:4,58 (short | long) | ||
| 1992/0318 | #include "../boot/boot.h" static Fcall hdr; | |
| 1992/0319 | static void rpc(int fd, int type) | |
| 1992/0318 | { | |
| 1992/0319 | int n, l; char buf[128], *p; | |
| 1992/0318 |
| |
| 1992/0319 | hdr.type = type; | |
| 1992/0318 | hdr.tag = NOTAG; n = convS2M(&hdr, buf); if(write(fd, buf, n) != n) | |
| 1992/0319 | fatal("write rpc"); print("..."); p = buf; l = 0; while(l < 3) { n = read(fd, p, 3); if(n <= 0) fatal("read rpc"); if(n == 2 && l == 0 && buf[0] == 'O' && buf[1] == 'K') continue; p += n; l += n; | |
| 1992/0318 | } | |
| 1992/0319 | if(convM2S(buf, &hdr, n) == 0){ print("%ux %ux %ux\n", buf[0], buf[1], buf[2]); fatal("rpc format"); } if(hdr.tag != NOTAG) fatal("rpc tag not NOTAG"); if(hdr.type == Rerror){ print("error %s;", hdr.ename); fatal("remote error"); } if(hdr.type != type+1) fatal("not reply"); | |
| 1992/0318 | } void | |
| 1992/0319 | nop(int fd) | |
| 1992/0318 | { | |
| 1992/0319 | print("nop"); rpc(fd, Tnop); } | |
| 1992/0318 |
| |
| 1992/0319 | void session(int fd) { print("session"); rpc(fd, Tsession); | |
| 1992/0318 | } | |
| 1992/0319/sys/src/9/boot/nopsession.c:1,5 – 1993/0330/sys/src/9/boot/nopsession.c:1,6 (short | long) | ||
| 1992/0318 | #include <u.h> #include <libc.h> | |
| 1993/0330 | #include <auth.h> | |
| 1992/0318 | #include <fcall.h> #include "../boot/boot.h" | |
| 1992/0319/sys/src/9/boot/nopsession.c:48,58 – 1993/0330/sys/src/9/boot/nopsession.c:49,52 | ||
| 1992/0318 | { | |
| 1992/0319 | print("nop"); rpc(fd, Tnop); | |
| 1992/0318 | ||
| 1992/0319 |
| |
| 1992/0318 | } | |
| 1993/0330/sys/src/9/boot/nopsession.c:4,9 – 2001/0527/sys/src/9/boot/nopsession.c:4,12 (short | long) | ||
| 1992/0318 | #include <fcall.h> #include "../boot/boot.h" | |
| 2001/0527 | /*BUG transition*/ int client9p=2; int kernel9p=2; | |
| 1992/0318 | static Fcall hdr; | |
| 1992/0319 | static void | |
| 2001/0527/sys/src/9/boot/nopsession.c:4,12 – 2002/0115/sys/src/9/boot/nopsession.c:4,9 (short | long) | ||
|
Remove 9P2000 transition code.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1992/0318 | #include <fcall.h> #include "../boot/boot.h" | |
| 2001/0527 |
| |
| 1992/0318 | static Fcall hdr; | |
| 1992/0319 | static void | |