[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Strange getcwd() return value
On Thu, 2013-10-24 at 22:54 +0200, Ole wrote:
> > preceding "/" in a path does not refer to the root of the filesystem
> > (which would be a constant thing) but the calling process' current
> > drive. And *that* can be anything :)
>
> Now we are talking. That's what I call nonsense. Maybe FreeMiNT wants
> to do behave like that - I will not. Using / as an placeholder for some
> specific
> disk/partition is just stupid in my eyes. Linux uses it to point to the
Take it or leave it, this is how DOS and GEMDOS works. What else would
you need Dgetdrv() and Dsetdrv() for?
In DOS and GEMDOS, the path and the drive are two different things.
MiNTlib tries to emulate a unix-type root filesystem on top of this,
which it does reasonably well *as long as you don't mix MiNTlib paths
with GEMDOS calls*. And that's exactly what you're doing if you pass
e.g. the cwd obtained from MiNTlib to rsrc_load(). If you want to do
this, you must atleast prepend it with a "u:" so GEMDOS will know which
drive's root your referring to.
> root of all
> filesystems: the unified filesystem. Using this chracter as a pointer
> to some
> specific partition makes sure there will be trouble with sane people.
Again, there is no root filesystem in DOS and GEMDOS. In GEMDOS you have
the current drive and the current path. In unix you have the current
path. You just have to live with it :)
Jo Even