fix name bug; try to use bigger offsets

This commit is contained in:
Russ Cox 2007-05-29 12:23:05 +00:00
parent be768764da
commit d1b585cfe2
2 changed files with 4 additions and 6 deletions

View File

@ -1,3 +1,4 @@
#include "u.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
@ -9,7 +10,6 @@
#ifndef NAME_MAX
# define NAME_MAX 256
#endif
#include "u.h"
#include "lib.h"
#include "dat.h"
#include "fns.h"
@ -33,7 +33,7 @@ struct Ufsinfo
int uid;
int gid;
DIR* dir;
ulong offset;
vlong offset;
QLock oq;
char nextname[NAME_MAX];
};
@ -160,8 +160,7 @@ fswalk(Chan *c, Chan *nc, char **name, int nname)
cname = addelem(cname, name[i]);
wq->qid[i] = nc->qid;
}
nc->name = nil;
cnameclose(cname);
nc->name = cname;
if(i != nname){
cclose(nc);
wq->clone = nil;

View File

@ -172,8 +172,7 @@ fswalk(Chan *c, Chan *nc, char **name, int nname)
cname = addelem(cname, name[i]);
wq->qid[i] = nc->qid;
}
nc->name = nil;
cnameclose(cname);
nc->name = cname;
if(i != nname){
cclose(nc);
wq->clone = nil;