static void iwalk(Xfile*, char*);
static void iopen(Xfile*, int);
static void icreate(Xfile*, char*, long, int);
-static long ireaddir(Xfile*, uchar*, long, long);
+static long ireaddir(Xfile*, uchar*, vlong, long);
static long iread(Xfile*, char*, vlong, long);
static long iwrite(Xfile*, char*, vlong, long);
static void iclunk(Xfile*);
dp = nil;
haveplan9 = 0;
for(i=VOLDESC;i<VOLDESC+100; i++){ /* +100 for sanity */
- p = getbuf(cd->d, i);
+ p = getbuf(cd->d, i, 1);
v = (Voldesc*)(p->iobuf);
if(memcmp(v->byte, "\01CD001\01", 7) == 0){ /* iso */
if(dirp)
}
static long
-ireaddir(Xfile *f, uchar *buf, long offset, long count)
+ireaddir(Xfile *f, uchar *buf, vlong offset, long count)
{
Isofile *ip = f->ptr;
Dir d;
while(count > 0){
if(n > count)
n = count;
- p = getbuf(f->xf->d, addr);
+ p = getbuf(f->xf->d, addr, 0);
memmove(&buf[rcnt], &p->iobuf[o], n);
putbuf(p);
count -= n;
ip->offset += Sectorsize-boff;
continue;
}
- p = getbuf(f->xf->d, addr/Sectorsize);
+ p = getbuf(f->xf->d, addr/Sectorsize, 1);
len = p->iobuf[boff];
if(len >= 34)
break;
char buf[Maxname+UTFmax+1];
uchar *q;
Rune r;
- enum { ONAMELEN = 28 }; /* old Plan 9 directory name length */
have = 0;
flags = 0;
* from plan9 directory extension
*/
nl = *s;
- if(nl >= ONAMELEN)
- nl = ONAMELEN-1;
+ if(nl >= Maxname)
+ nl = Maxname-1;
if(nl) {
- memset(d->name, 0, ONAMELEN);
+ memset(d->name, 0, Maxname);
memmove(d->name, s+1, nl);
}
s += 1 + *s;
nl = *s;
- if(nl >= ONAMELEN)
- nl = ONAMELEN-1;
- memset(d->uid, 0, ONAMELEN);
+ if(nl >= Maxname)
+ nl = Maxname-1;
+ memset(d->uid, 0, Maxname);
memmove(d->uid, s+1, nl);
s += 1 + *s;
nl = *s;
- if(nl >= ONAMELEN)
- nl = ONAMELEN-1;
- memset(d->gid, 0, ONAMELEN);
+ if(nl >= Maxname)
+ nl = Maxname-1;
+ memset(d->gid, 0, Maxname);
memmove(d->gid, s+1, nl);
s += 1 + *s;
if(((uintptr)s) & 1)
off = l32(p+12);
len = l32(p+20);
chat("getcontin %d...", bn);
- b = getbuf(dev, bn);
+ b = getbuf(dev, bn, 1);
if(b == 0){
*s = 0;
return 0;