Commit 0c4010a7 authored by Rob Pike's avatar Rob Pike

change DirInfo->dirInfo now that 6g export bug is fixed

R=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=24788
CL=24805
parent 60178956
...@@ -18,7 +18,7 @@ const ( ...@@ -18,7 +18,7 @@ const (
func Readdirnames(fd *FD, count int) (names []string, err *os.Error) { func Readdirnames(fd *FD, count int) (names []string, err *os.Error) {
// If this fd has no dirinfo, create one. // If this fd has no dirinfo, create one.
if fd.dirinfo == nil { if fd.dirinfo == nil {
fd.dirinfo = new(DirInfo); fd.dirinfo = new(dirInfo);
// The buffer must be at least a block long. // The buffer must be at least a block long.
// TODO(r): use fstatfs to find fs block size. // TODO(r): use fstatfs to find fs block size.
fd.dirinfo.buf = make([]byte, blockSize); fd.dirinfo.buf = make([]byte, blockSize);
......
...@@ -27,7 +27,7 @@ func clen(n []byte) int { ...@@ -27,7 +27,7 @@ func clen(n []byte) int {
func Readdirnames(fd *FD, count int) (names []string, err *os.Error) { func Readdirnames(fd *FD, count int) (names []string, err *os.Error) {
// If this fd has no dirinfo, create one. // If this fd has no dirinfo, create one.
if fd.dirinfo == nil { if fd.dirinfo == nil {
fd.dirinfo = new(DirInfo); fd.dirinfo = new(dirInfo);
// The buffer must be at least a block long. // The buffer must be at least a block long.
// TODO(r): use fstatfs to find fs block size. // TODO(r): use fstatfs to find fs block size.
fd.dirinfo.buf = make([]byte, blockSize); fd.dirinfo.buf = make([]byte, blockSize);
......
...@@ -8,7 +8,7 @@ import syscall "syscall" ...@@ -8,7 +8,7 @@ import syscall "syscall"
import os "os" import os "os"
// Auxiliary information if the FD describes a directory // Auxiliary information if the FD describes a directory
type DirInfo struct { // TODO(r): 6g bug means this can't be private type dirInfo struct { // TODO(r): 6g bug means this can't be private
buf []byte; // buffer for directory I/O buf []byte; // buffer for directory I/O
nbuf int64; // length of buf; return value from Getdirentries nbuf int64; // length of buf; return value from Getdirentries
bufp int64; // location of next record in buf. bufp int64; // location of next record in buf.
...@@ -18,7 +18,7 @@ type DirInfo struct { // TODO(r): 6g bug means this can't be private ...@@ -18,7 +18,7 @@ type DirInfo struct { // TODO(r): 6g bug means this can't be private
type FD struct { type FD struct {
fd int64; fd int64;
name string; name string;
dirinfo *DirInfo; // nil unless directory being read dirinfo *dirInfo; // nil unless directory being read
} }
func (fd *FD) Fd() int64 { func (fd *FD) Fd() int64 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment