Re: another little proposal

H. Peter Anvin (hpa@transmeta.com)
18 Aug 1997 08:26:17 GMT


Followup to: <x7u3gopdv1.fsf@sl-kb05.rz.uni-karlsruhe.de>
By author: Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
In newsgroup: linux.dev.kernel
>
> Hi,
>
> Again for the libc, I need an ioctl option which allows me to query
> the mode of a descriptor which was used in open. I.e.,
>
> int fd, mode;
> fd = open ("foo", O_RDONLY);
> ioctl (fd, FIGMODE, &mode);
>
> would fill `mode' with O_RDONLY etc. This should be pretty easy to add.
> (If something like this is already available please educate me.)
>

If anything, this would be an fcntl(); ioctl's are typically
per-inode, whereas fcntl's are per-file-descriptor.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
Always looking for a few good BOsFH.  **  Linux - the OS of global cooperation
        I am Baha'i -- ask me about it or see http://www.bahai.org/