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

RE: [MiNT] Longfilename support functions?



> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Stanislav Opichal
> Sent: Wednesday, June 07, 2000 3:17 PM
> To: MiNT list
> Subject: Re: [MiNT] Longfilename support functions?
>
>
> > > > Will this work with filesystems like TOS/VFAT (and both on MiNT and
> > Magic)
> > > > that don't record a file index?
> > >
> > How can I detect that the index wouldn't be filled properly and thus I
> need
> > to zero it manually?
>
> Should I zero it before Fxattr() call like this?
>
> GetFile( char *filename )
> {
>     XATTR xattr;
>     xattr.dev = 0;
>     xattr.index = 0;
>     res = Fxattr( 0, filename, &xattr );
>     if (( res == 0 || ( res == EINVFN )) {
>         /* store the index, dev and pathname*/
>     } else {
>         /* an error occured */
>     }
> }
>
> BTW: Under MagiCCP it seems not to set the index properly as mentioned
> before.
> The files are beeing loaded multiple times here...

Setting it to 0 won't hurt, but it won't help with MiNT + TOSDS either
(where Fxattr() just returns an incrementing counter as index).