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

Re: [MiNT] System call bindings



Frank Naumann wrote:

Hello!

I can't aggree. FreeMiNT use opendir/readdir/closedir to emulate Fsfirst/Fsnext. And the readdir dispatch pass a buffer of 14 bytes down to the xfs and copy this over into the DTA buffer. I really wonder how you get long filenames through FreeMiNT Fsfirst/Fsnext.

Take a look on the implementation:

http://sparemint.atariforge.net/cgi-bin/cvsweb/freemint/sys/dosdir.c?rev=1.22&content-type=text/x-cvsweb-markup

Ok I see.

Why not copy directly name if Pdomain(1) thread is active, this will be more logical, is there any trouble with this?


I don't understand.

Ok I'm looking in source code

there is:

copy8_3 (dta->dta_pat, slash);
This is I suppose the way to pass from longfilename to short
If I understand you not need to do something here if Pdomain is put to 1 by client

And at:
strncpy (dta->dta_name, slash, TOS_NAMELEN-1);
change by strncpy (dta->dta_name, slash, PATH_MAX-1); if Pdomain = 1;

It could looks something like this if I understand:
if (p->domain == DOM_TOS) copy8_3 (dta->dta_pat, slash);
....
if (p->domain == DOM_TOS) strncpy (dta->dta_name, slash, TOS_NAMELEN-1);
else strncpy (dta->dta_name, slash, PATH_MAX-1);

Olivier