Subject: afs/fs/cachefs rootdir.c,1.14,1.15

From: [email-masked]
Date: Thu, 17 Jul 2003 09:49:41 +0100

Update of /home/cvs/afs/fs/cachefs
In directory phoenix.infradead.org:/tmp/cvs-serv14717

Modified Files:
	rootdir.c 
Log Message:
readdir now displays cache contents again

Index: rootdir.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/rootdir.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- rootdir.c	10 Jul 2003 14:21:23 -0000	1.14
+++ rootdir.c	17 Jul 2003 08:49:39 -0000	1.15
@@ -185,7 +185,7 @@
 		_debug("dirent: %d '%s' ino=%u",
 		       nlen, rec->scratch, xent->ino);
 
-		if (nlen) {
+		if (nlen <= 0) {
 			desc->count	-= rec->esize;
 			desc->written	+= rec->esize;
 			ret		+= rec->esize;
@@ -257,7 +257,7 @@
 	rec.dpos_off	= 2;
 	rec.dsize	= inode->index_dsize;
 	rec.esize	= inode->index_esize;
-	rec.epp		= inode->index_esize;
+	rec.epp		= inode->index_epp;
 
 	metadata = cachefs_metadata_preread(inode);
 	memcpy(rec.keys, metadata->index.keys, sizeof(rec.keys));
@@ -282,7 +282,7 @@
 
 	/* deal with root directory only entries */
 	if (inode->vfs_inode.i_ino == CACHEFS_INO_ROOTDIR) {
-		rec.dpos_off = 5;
+		rec.dpos_off = 4;
 		switch (file->f_pos) {
 		case 2:
 			ret = filldir(cookie, "metadata_catalogue", 18,