aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/convM2D.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2010-12-07 13:34:11 -0500
committerRuss Cox <rsc@swtch.com>2010-12-07 13:34:11 -0500
commit74dd0321756f968c595487f694fbe74ad00f0624 (patch)
treee551d8fbc2c00f8670c0073c1d794dda19cd2ac7 /src/lib9/convM2D.c
parentd10a7ed9a899c17d142021298dd45b4ea9ae6b84 (diff)
downloadplan9port-74dd0321756f968c595487f694fbe74ad00f0624.tar.gz
plan9port-74dd0321756f968c595487f694fbe74ad00f0624.tar.bz2
plan9port-74dd0321756f968c595487f694fbe74ad00f0624.zip
delete 9P2000.u
thanks to Erik Quanstrom R=rsc http://codereview.appspot.com/3469042
Diffstat (limited to 'src/lib9/convM2D.c')
-rw-r--r--src/lib9/convM2D.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/lib9/convM2D.c b/src/lib9/convM2D.c
index 52d7fad5..504110b2 100644
--- a/src/lib9/convM2D.c
+++ b/src/lib9/convM2D.c
@@ -3,7 +3,7 @@
#include <fcall.h>
int
-statchecku(uchar *buf, uint nbuf, int dotu)
+statcheck(uchar *buf, uint nbuf)
{
uchar *ebuf;
int i, nstr;
@@ -16,33 +16,22 @@ statchecku(uchar *buf, uint nbuf, int dotu)
buf += STATFIXLEN - 4 * BIT16SZ;
nstr = 4;
- if(dotu)
- nstr = 5;
for(i = 0; i < nstr; i++){
if(buf + BIT16SZ > ebuf)
return -1;
buf += BIT16SZ + GBIT16(buf);
}
- if(dotu)
- buf += 3*BIT32SZ;
-
if(buf != ebuf)
return -1;
return 0;
}
-int
-statcheck(uchar *buf, uint nbuf)
-{
- return statchecku(buf, nbuf, 0);
-}
-
static char nullstring[] = "";
uint
-convM2Du(uchar *buf, uint nbuf, Dir *d, char *strs, int dotu)
+convM2D(uchar *buf, uint nbuf, Dir *d, char *strs)
{
uchar *p, *ebuf;
char *sv[5];
@@ -75,8 +64,6 @@ convM2Du(uchar *buf, uint nbuf, Dir *d, char *strs, int dotu)
p += BIT64SZ;
nstr = 4;
- if(dotu)
- nstr = 5;
for(i = 0; i < nstr; i++){
if(p + BIT16SZ > ebuf)
return 0;
@@ -93,25 +80,12 @@ convM2Du(uchar *buf, uint nbuf, Dir *d, char *strs, int dotu)
p += ns;
}
- if(dotu){
- if(p + BIT32SZ*3 > ebuf)
- return 0;
- d->uidnum = GBIT32(p);
- p += BIT32SZ;
- d->gidnum = GBIT32(p);
- p += BIT32SZ;
- d->muidnum = GBIT32(p);
- p += BIT32SZ;
- }
-
if(strs){
d->name = sv[0];
d->uid = sv[1];
d->gid = sv[2];
d->muid = sv[3];
d->ext = nullstring;
- if(dotu)
- d->ext = sv[4];
}else{
d->name = nullstring;
d->uid = nullstring;
@@ -122,9 +96,3 @@ convM2Du(uchar *buf, uint nbuf, Dir *d, char *strs, int dotu)
return p - buf;
}
-
-uint
-convM2D(uchar *buf, uint nbuf, Dir *d, char *strs)
-{
- return convM2Du(buf, nbuf, d, strs, 0);
-}