[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] New MiNTlib & FreeMiNT functions



Hello!

First you must define a format that Fread() give back on an open
directory. Then you need to enhance every (I think at least ext2, minix,
vfat and the ramfs) xfs to support this new feature and to return this
format on a Fread(). At the moment the xfs just return the on disk data (I
think this is a very bad idea).

I'll check the situation with Fread, but that should just return EISDIR
as reading isn't allowed. So I'll fix this.

That's the point I mean with side effects ... Fread() mainly pass through to the xdd. There is no check inside any xfs read() against directories ...

Btw. now I'm very curious. What's the advantage if we can open directories but can't read these directories? Just for fchdir()?

Remember, we only allow opening a directory READONLY !

Even read access may have side effects. There are a lot of code paths you can apply on a filedescriptor. For example fchown, fchmod, fcntl, fselect, flock, fforce, fdup and a lot, lot more. All these code paths expect until now only regular files. You need to check and verify all these code paths for side effects (inside kernel and maybe also inside mintlib).


Regards,
Frank

--
ATARI FALCON 060 // MILAN 060
-----------------------------
http://sparemint.org/
e-Mail: fnaumann@boerde.de