Re: [Yaffs] yaffs/direct: no '.' or '..' ?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs/direct: no '.' or '..' ?
On Wednesday 12 November 2008 04:27:28 Rutger Hofman wrote:
> Hello list,
>
> I am making progress with implementing YAFFS on eCos (on top of my
> work-in-progress NAND flash controller). I can make files, directories,
> list dirs, remove files and directories, etc. One of the obstacles was
> that I had to find out that _block_query() must read the spare area to
> see if there is a chunkUsed value. One for the documentation?
>
> Now I meet a problem:
>
> when I yaffs_opendir()/yaffs_readdir() a directory, I see no mention of
> the directories '.' and '..' .
> Is that correct?
> If yes, is that intentional?
> If yes, I guess my wrapper layer must provide them; if I perform
> opendir()/readdir() under Linux, I see '.' and '..' listed.
>
> On the other hand, I can see consistency:
> = if I do yaffs_stat("."), I get an ENOENT error;
> = if I chdir into some directory and chdir(".."), I get an ENOENT error.
>
> Should my library wrapper resolve '.' and '..' before entering
> yaffs_direct calls?


Yes. You will find that is how most file systems will do this and that is how
the yaffs linux wrapper does this.