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

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.

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?

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de