changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > ventivac / changeset: mention why a Dir is stored for Readdir.

changeset 106: 5c7c019578cf
parent 105: b2d15be09468
child 107: f59da92b57d9
author: Mechiel Lukkien <mechiel@ueber.net>
date: Wed, 15 Aug 2007 20:54:13 +0200
files: appl/cmd/vacfs.b
description: mention why a Dir is stored for Readdir.
     1.1--- a/appl/cmd/vacfs.b	Wed Aug 15 20:20:48 2007 +0200
     1.2+++ b/appl/cmd/vacfs.b	Wed Aug 15 20:54:13 2007 +0200
     1.3@@ -43,7 +43,7 @@
     1.4 	File =>	vf: 	ref Vacfile;
     1.5 	Dir =>	vd:	ref Vacdir;
     1.6 		pqid:	int;
     1.7-		prev:	(int, ref Sys->Dir);
     1.8+		prev:	(int, ref Sys->Dir);	# last returned Dir to Readdir
     1.9 	}
    1.10 
    1.11 	mkdir:	fn(qid: int, de: ref Direntry, size: big, vd: ref Vacdir, pqid: int): ref Elem.Dir;
    1.12@@ -248,6 +248,7 @@
    1.13 				ed.prev = (-1, nil);
    1.14 			}
    1.15 
    1.16+			# prev is needed because styxservers can request the previously returned Dir
    1.17 			(loffset, d) := ed.prev;
    1.18 			if(loffset != n.offset) {
    1.19 				(ok, de) := ed.vd.readdir();