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

View File

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