diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-21 18:43:25 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-21 18:43:25 +0200 |
commit | 0ce50ebc5750c15e30c6f2d5ba23a0dd329c6c47 (patch) | |
tree | 632820e8f512fb36342f62fcfb92c517089e6e3c /sys/src/cmd/cwfs/main.c | |
parent | 501774b0968d59994d5012fab62fa8221d8b7923 (diff) |
cwfs: remove 9p1 support
Diffstat (limited to 'sys/src/cmd/cwfs/main.c')
-rw-r--r-- | sys/src/cmd/cwfs/main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/src/cmd/cwfs/main.c b/sys/src/cmd/cwfs/main.c index 97ce1cb42..96362f2b9 100644 --- a/sys/src/cmd/cwfs/main.c +++ b/sys/src/cmd/cwfs/main.c @@ -1,7 +1,6 @@ /* cached-worm file server */ #include "all.h" #include "io.h" -#include "9p1.h" Map *devmap; @@ -466,10 +465,11 @@ serve(void *) if (mb->data == nil) panic("serve: nil mb->data"); - /* better sniffing code in /sys/src/cmd/disk/kfs/9p12.c */ - if(cp->protocol == nil){ + if(cp->protocol != nil){ + /* process the request, generate an answer and reply */ + cp->protocol(mb); + } else { /* do we recognise the protocol in this packet? */ - /* better sniffing code: /sys/src/cmd/disk/kfs/9p12.c */ for(i = 0; fsprotocol[i] != nil; i++) if(fsprotocol[i](mb) != 0) { cp->protocol = fsprotocol[i]; @@ -479,9 +479,7 @@ serve(void *) fprint(2, "no protocol for message\n"); hexdump(mb->data, 12); } - } else - /* process the request, generate an answer and reply */ - cp->protocol(mb); + } mbfree(mb); runlock(&mainlock); |