[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fchmod function
>
> One of the programs I'm porting uses fchmod()... has anyone written one
> that can be added to the MiNTlibs? There currently isn't one in there
I think with the current version of MiNT a real fchmod() is not possible
(Tell me if I'm wrong). Fchmod() takes a filename, not a descriptor. So
it would be necessary to add a new ioctl(), lets say FCHMOD.
The only way to do an fchmod() without this is to get the files inode/dev
numbers with fstat() (yes there is an FSTAT ioctl) and search the whole
filesystem for the file with this inode/dev and then do an Fchmod() on
this file.
But this idea is a poor one, since inodes on TosFs are fake and
filesystems tend to be very large :)
Cheers, Kay Roemer.