summaryrefslogtreecommitdiffstats
path: root/src/libthread/read9pmsg.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-25 21:56:33 +0000
committerrsc <devnull@localhost>2004-12-25 21:56:33 +0000
commit1544f90960275dc9211bde30329c3258e0e1bf38 (patch)
treef55e7a73c03aaa24daa7cc2ad02822b921c477f9 /src/libthread/read9pmsg.c
parent7788fd54094693384ef5c92c475656dba8819feb (diff)
downloadplan9port-1544f90960275dc9211bde30329c3258e0e1bf38.tar.gz
plan9port-1544f90960275dc9211bde30329c3258e0e1bf38.zip
New thread library
Diffstat (limited to 'src/libthread/read9pmsg.c')
-rw-r--r--src/libthread/read9pmsg.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/libthread/read9pmsg.c b/src/libthread/read9pmsg.c
deleted file mode 100644
index 652fc82f..00000000
--- a/src/libthread/read9pmsg.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <u.h>
-#include <libc.h>
-#include <fcall.h>
-#include <thread.h>
-
-int
-threadread9pmsg(int fd, void *abuf, uint n)
-{
- int m, len;
- uchar *buf;
-
- buf = abuf;
-
- /* read count */
- m = threadreadn(fd, buf, BIT32SZ);
- if(m != BIT32SZ){
- if(m < 0)
- return -1;
- return 0;
- }
-
- len = GBIT32(buf);
- if(len <= BIT32SZ || len > n){
- werrstr("bad length in 9P2000 message header");
- return -1;
- }
- len -= BIT32SZ;
- m = threadreadn(fd, buf+BIT32SZ, len);
- if(m < len)
- return 0;
- return BIT32SZ+m;
-}