This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.18.0] rewinddir operation


Hi Jeff,

Indeed, I noticed your patch a few days ago.
Thank you for you kind answer.

Xavier

Le 15 mars 2010 à 21:29, Jeff Johnston a écrit :

> Hi Xavier,
> 
> I have just recently patched this in newlib.  As you have noted, the code was in error.  A special case is now added for 0 to mean rewind.
> 
> -- Jeff J.
> 
> On 03/08/2010 12:32 PM, Xavier Guérin wrote:
>> Dear list,
>> 
>> I just encountered a small issue with rewinddir. Although opendir and readdir works properly
>> on my operating system, I can't make rewinddir working.
>> After reading the code of _seekdir, I don't seem to understand how it could work anyway.
>> 
>> It looks like _seekdir relies on dd_hash to locate the the entry the user is looking for.
>> However, dd_hash is only used by telldir and seekdir. I know that seekdir should only be used
>> with values returned by telldir, but rewinddir bypasses this restriction and uses 0 as off_t parameter.
>> 
>> Consequently, the first few lines of _seekdir fail, since dd_hash[LOCHASH(0)] does not contain a vaild
>> ddloc entry.
>> 
>> Could you please tell me what I am missing ?
>> 
>> Thanks in advance,
>> Xavier
>> 
>> 
>> -----
>> Xavier Guérin - Doctoral student
>> TIMA Laboratory, SLS Group
>> 46, av. Félix Viallet, 38000 GRENOBLE, FR
>> Mail : xavier.guerin@imag.fr
>> Phone : +33(0)4 76 57 47 59
>> Ad Astra Per Aspera
>> Triste e' quel discepolo che non avanza il suo maestro
>> 
> 


-----
Xavier Guérin - Doctoral student
TIMA Laboratory, SLS Group
46, av. Félix Viallet, 38000 GRENOBLE, FR
Mail : xavier.guerin@imag.fr
Phone : +33(0)4 76 57 47 59
Ad Astra Per Aspera
Triste e' quel discepolo che non avanza il suo maestro

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]