ref: d1b585cfe24c6fd89865a1301ec933597c4de5e6
parent: be768764da1d66ac83a5ee9c5a0a24abfaf2bfc1
author: Russ Cox <rsc@swtch.com>
date: Tue May 29 08:23:05 EDT 2007
fix name bug; try to use bigger offsets
--- a/kern/devfs-posix.c
+++ b/kern/devfs-posix.c
@@ -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 @@
int uid;
int gid;
DIR* dir;
- ulong offset;
+ vlong offset;
QLock oq;
char nextname[NAME_MAX];
};
@@ -160,8 +160,7 @@
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;
--- a/kern/devfs-win32.c
+++ b/kern/devfs-win32.c
@@ -172,8 +172,7 @@
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;