Subject: Re: Caching status between VOP_READDIR calls
To: None <jmmv84@gmail.com>
From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
List: tech-kern
Date: 09/16/2005 19:50:10
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-5-409439345
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On 09.09.2005, at 20:36, Julio M. Merino Vidal wrote:
> OK.  Thanks for the explanations (to Christos too).
>
> Now I realize that my question was not very accurate...  I mean, I must
> keep my caching variables because what I'm keeping track of is a
> pointer, not an offset.

I think you want to use uio->uio_offset.  This is being initialized to 
0 on the start of a readdir() and subsequent readdir() calls will just 
pass in the last offset you left in uio->uio_offset.  So this could be 
used to store a pointer.  On the other hand this means you can't 
rellocate your memory after an readdir (same for the cookies).

cheers
   simon
-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

--Apple-Mail-5-409439345
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDKwXZr5S+dk6z85oRAua4AKDxLu3atKxrqPuzuveDTS5fRnpqxACg7ayD
qJz4hX9LVYG486UMgY3M0AE=
=6VFr
-----END PGP SIGNATURE-----

--Apple-Mail-5-409439345--