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

Re: [MiNT] 'cd' does not like u:



Helmut Karlowski wrote:

>> Converting between DOS-style and unix-style paths has traditionally
>> been the left to the applications (handled by MiNTlib usually). I see
>> no reason to change this. OK, we're only talking about one specific path,
> 
> Why does cd not work then, when it has "traditionally been handled" by
> mintlib? Version seems not to be the cause.

Because of a bug?

>> but why should this be an exception? The concept of '/' as a
>> representation of the root fs doesn't translate well to GEMDOS. There is
> 
> I think MiNT does the translation (not sure).

Fopen("/kern/sysdir", 0) fails, while Fopen("u:/kern/sysdir", 0) works.
It behaves the same in both MiNT- and TOS-domain.

I don't think the kernel can do this translation. How does it know when
to translate a leading / to 'u:/' and when it refers to the root of the
current drive?

>> no such thing as a "root fs" in GEMDOS, it's represented by the drive
>> U. Having $SYSDIR pointing to '/c/mint...' is IMO not correct in
>> MiNT/GEMDOS, as a leading / means that the path is relative to the
>> root of the current drive which could be any drive and not necessarily U.
> 
> That's why the cd u: should be in your mint.cnf.

But any program can change the current working drive, which will break
$SYSDIR if the drive is omitted from the path.

>> This could just as well be the reason why xaloader works fine with
>> this kind of path - have you tried to change it's working drive to
>> e.g. C and then test the "unix path"?
> 
> When I call
> 
>   Dsetdrv('c' - 'a');
> 
> instead of
> 
>   Dsetdrv('u' - 'a');
> 
> in xaloader and run this with /c/mint... all works, no difference.
> 
> The /c/... gets translated to u:\c\...

See above. This must be an internal feature to the kernel or xaloader.

>> If 'cd c:' works but 'cd u:' doesn't then I'd say cd (or MiNTlib) is
>> broken and should be fixed.
> 
> None of them work.

'cd c:' works fine here, but 'cd u:' doesn't. cd from a plain EasyMiNT
install.

>> That's true. Cygwin's only purpose is to ease porting of unix-stuff to
>> windows. So using unix-style paths makes perfect sense.
> 
> So you want to handicap the porting?

No, I don't want to stop MiNTlib from translating a leading \ to 'u:\'
;-) I think the current behaviour is fine and correct.

Jo Even