[ECOS] opendir with empty directory name?
Gary Thomas
gary@mlbassoc.com
Tue Mar 18 18:36:00 GMT 2008
Hong,Zhichao wrote:
> Hi, all,
>
> I am wondering what is the behavior of opendir("") in eCos fileio
> implementation? I am reading some code written by others. And the
> comment says open the current directory then code is written as
> opendir("").
> And the code seems to work as documented. But should not this actually
> be opendir("."). I search the POSIX and various compiler
> implementation. It does not seem any of them support this kind of empty
> directory. Is this an eCos bug or a feature?
Why not just use the POSIX standard path (".") and *not*
rely on [possibly] non-standard behaviour.
If you've seen other code that uses "" to mean the current
directory, I'd postulate that code is incorrect or at the
very least, non portable. Was this eCos code? in CVS or
elsewhere?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list