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

RE: [MiNT] an example of broken lib



> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Guido Flohr
> Sent: Wednesday, June 23, 1999 10:25 PM
> To: MiNT mailing list
> Subject: Re: [MiNT] an example of broken lib
>
>
> On Wed, Jun 23, 1999 at 11:07:04PM +0200, Frank Naumann wrote:
> > No, xfs support isn't necessary. The kernel have all
> informations. I added
> > Ffchown() and Ffchmod() some minutes ago:
> >
> > 	dos_tab[0x101] = f_fchown;  /* 1.15.2 */
> > 	dos_tab[0x102] = f_fchmod;  /* 1.15.2 */
> >
> > implemented like Fchown() & Fchmod(). Any suggestions?
>
> Yep, sorry, this is insider knowledge: Could you change the type of the
> first argument from "short int" to "long int"?  Otherwise, the library
> binding actually had to check if the descriptor is out of bounds.  I think
> this is better done by the kernel.

That would be inconsistent with the rest of the GEMDOS bindings (if by
descriptor you mean "file handle").

> A propos library binding: What if Ffchown() and Ffchmod() is not supported
> by the kernel?  I would suggest to always return 0 for success in the
> library.  For older MiNT versions this is somewhat problematic but it will
> be handy for MagiC and TOS without mulit-user support.  Anybody has got
> problems with that?
>
> The same applies under MiNT if the FS doesn't support these calls.  I
> think it is ok to report success nonetheless, is it?

The kernel should pass back what the XFS reports. It shouldn't make any
assumptions about why a particular error code is returned.