* Issue in man page ioctl.2
@ 2025-08-24 14:48 Helge Kreutzmann
2025-08-24 20:14 ` Alejandro Colomar
0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 2025-08-24 14:48 UTC (permalink / raw)
To: alx; +Cc: mario.blaettermann, linux-man
Without further ado, the following was found:
Issue: What is fildes?
"B<ioctl(int >I<fildes>B<, int >I<op>B<, struct sgttyb *>I<argp>B<);>\n"
"B<ioctl(int >I<fildes>B<, int >I<request>B<, struct sgttyb *>I<argp>B<);>\n"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue in man page ioctl.2
2025-08-24 14:48 Issue in man page ioctl.2 Helge Kreutzmann
@ 2025-08-24 20:14 ` Alejandro Colomar
2025-08-24 21:18 ` Collin Funk
0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Colomar @ 2025-08-24 20:14 UTC (permalink / raw)
To: Helge Kreutzmann; +Cc: mario.blaettermann, linux-man
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
Hi Helge,
On Sun, Aug 24, 2025 at 02:48:42PM +0000, Helge Kreutzmann wrote:
> Without further ado, the following was found:
>
> Issue: What is fildes?
It seems a weird way of saying file descriptor. I'll change it to fd.
Also present in close(2), where it's a bug, because nothing else calls
it 'fildes':
$ grep -rn \\bfildes\\b
man2/close.2:219:.I fildes
man2/ioctl.2:102:.BI "ioctl(int " fildes ", int " op ", struct sgttyb *" argp );
man2/ioctl.2:139:.BI "int ioctl(int " fildes ", int " op ", ... /* " arg " */);"
Cheers,
Alex
> "B<ioctl(int >I<fildes>B<, int >I<op>B<, struct sgttyb *>I<argp>B<);>\n"
>
> "B<ioctl(int >I<fildes>B<, int >I<request>B<, struct sgttyb *>I<argp>B<);>\n"
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue in man page ioctl.2
2025-08-24 20:14 ` Alejandro Colomar
@ 2025-08-24 21:18 ` Collin Funk
2025-08-25 4:11 ` Alejandro Colomar
0 siblings, 1 reply; 4+ messages in thread
From: Collin Funk @ 2025-08-24 21:18 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: Helge Kreutzmann, mario.blaettermann, linux-man
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
Alejandro Colomar <alx@kernel.org> writes:
> Hi Helge,
>
> On Sun, Aug 24, 2025 at 02:48:42PM +0000, Helge Kreutzmann wrote:
>> Without further ado, the following was found:
>>
>> Issue: What is fildes?
>
> It seems a weird way of saying file descriptor. I'll change it to fd.
>
> Also present in close(2), where it's a bug, because nothing else calls
> it 'fildes':
>
> $ grep -rn \\bfildes\\b
> man2/close.2:219:.I fildes
> man2/ioctl.2:102:.BI "ioctl(int " fildes ", int " op ", struct sgttyb *" argp );
> man2/ioctl.2:139:.BI "int ioctl(int " fildes ", int " op ", ... /* " arg " */);"
Not really a bug, IMO. It is just a common way that POSIX refers to file
descriptors in function prototypes. See the old ioctl page, close, or
many others [1] [2].
Or the aio_fildes field of struct aiocb required by POSIX [3].
Collin
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html
[2] https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html
[3] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Issue in man page ioctl.2
2025-08-24 21:18 ` Collin Funk
@ 2025-08-25 4:11 ` Alejandro Colomar
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2025-08-25 4:11 UTC (permalink / raw)
To: Collin Funk; +Cc: Helge Kreutzmann, mario.blaettermann, linux-man
[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]
Hi Collin,
On Sun, Aug 24, 2025 at 02:18:23PM -0700, Collin Funk wrote:
> Alejandro Colomar <alx@kernel.org> writes:
>
> > Hi Helge,
> >
> > On Sun, Aug 24, 2025 at 02:48:42PM +0000, Helge Kreutzmann wrote:
> >> Without further ado, the following was found:
> >>
> >> Issue: What is fildes?
> >
> > It seems a weird way of saying file descriptor. I'll change it to fd.
> >
> > Also present in close(2), where it's a bug, because nothing else calls
> > it 'fildes':
> >
> > $ grep -rn \\bfildes\\b
> > man2/close.2:219:.I fildes
> > man2/ioctl.2:102:.BI "ioctl(int " fildes ", int " op ", struct sgttyb *" argp );
> > man2/ioctl.2:139:.BI "int ioctl(int " fildes ", int " op ", ... /* " arg " */);"
>
> Not really a bug, IMO. It is just a common way that POSIX refers to file
> descriptors in function prototypes. See the old ioctl page, close, or
> many others [1] [2].
Not a bug in ioctl(2). But it's a bug in close(2), as it is in italics,
meaning that it refers to the function parameter 'fildes', but in the
function prototype it's called 'fd'.
Anyway, I've changed it also in ioctl(2) for consistency with all the
other pages.
But it's interesting to know that POSIX calls it 'fildes'. I hadn't
noticed.
> Or the aio_fildes field of struct aiocb required by POSIX [3].
Yup, there's that one.
> Collin
>
> [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html
> [2] https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html
> [3] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-25 4:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-24 14:48 Issue in man page ioctl.2 Helge Kreutzmann
2025-08-24 20:14 ` Alejandro Colomar
2025-08-24 21:18 ` Collin Funk
2025-08-25 4:11 ` Alejandro Colomar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.