aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/convM2S.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-09-13 01:37:14 +0000
committerrsc <devnull@localhost>2005-09-13 01:37:14 +0000
commitfb941e08c52162fb41a14732be1ab70f20b450e3 (patch)
treec317bd44e1ed4b5e7fa5854785fdfa6a40348a84 /src/lib9/convM2S.c
parentb7eed2e0e14b980bed4ced80a357189a981d28bc (diff)
downloadplan9port-fb941e08c52162fb41a14732be1ab70f20b450e3.tar.gz
plan9port-fb941e08c52162fb41a14732be1ab70f20b450e3.tar.bz2
plan9port-fb941e08c52162fb41a14732be1ab70f20b450e3.zip
Add 9P2000.u functions.
Diffstat (limited to 'src/lib9/convM2S.c')
-rw-r--r--src/lib9/convM2S.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib9/convM2S.c b/src/lib9/convM2S.c
index 920775ea..23b688ab 100644
--- a/src/lib9/convM2S.c
+++ b/src/lib9/convM2S.c
@@ -48,7 +48,7 @@ gqid(uchar *p, uchar *ep, Qid *q)
* to test at end of routine.
*/
uint
-convM2S(uchar *ap, uint nap, Fcall *f)
+convM2Su(uchar *ap, uint nap, Fcall *f, int dotu)
{
uchar *p, *ep;
uint i, size;
@@ -229,6 +229,13 @@ convM2S(uchar *ap, uint nap, Fcall *f)
case Rerror:
p = gstring(p, ep, &f->ename);
+ f->errornum = 0;
+ if(dotu){
+ if(p+BIT16SZ > ep)
+ return 0;
+ f->errornum = GBIT16(p);
+ p += BIT16SZ;
+ }
break;
case Rflush:
@@ -321,3 +328,9 @@ convM2S(uchar *ap, uint nap, Fcall *f)
return size;
return 0;
}
+
+uint
+convM2S(uchar *ap, uint nap, Fcall *f)
+{
+ return convM2Su(ap, nap, f, 0);
+}