[haiku-development] Re: Ticket #2617 seekdir and telldir not implemented

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 22 Jul 2009 01:20:26 -0400

I have written some code for telldir() and seekdir(), how do I run the
dirent_test test app to see if my code is working?

On Tue, Aug 19, 2008 at 5:08 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>wrote:

> "John Scipione" <jscipione@xxxxxxxxx> wrote:
> > My solution is to extend the _DIR struct to include a loc, and an off
> > property (we already have a size in dir->first_entry.d_reclen).
> > readdir() and seekdir() should set those properties, and telldir can
> > simply return the offset. This means that I am going to have to do
> > some reimplementation work on readdir(). It also means that I am
> > going
> > to have to store the current "chuck" in the _DIR struct as well so
> > that I know what chuck my offset is relative to. It is a lot of work.
> > But in the end I think that it will all be a lot simpler.
>
> There also is a small test app (src/tests/system/libroot/posix/
> dirent_test.cpp) that might help you in getting it right.
>
> Bye,
>    Axel.
>
>
>

Other related posts: