ioctl_pipe(2): SYNOPSIS: $1
A message that is not in the archive (sent off-list or not yet received): 20241214180348.pp4vrlnxqpo6cus6@devuan
Alejandro Colomar
maintainerOops, I forgot to CC the linux-man@ list. Fixed now.
Quoted 19 lines · Alejandro Colomar
Hi Cyril,
The manual page
ioctl_pipe(2)has this synopsis:int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_SIZE, int size); int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_FILTER, struct watch_notification_filter *filter);Which says the $1 is an array of int (the type is declared as int[1]). However, this is incorrect, since the first argument is of course a plain int, a single file descriptor. Would you mind revising the page?
Thanks!
And have a lovely night!
AlexSignature · 1 line
<https://www.alejandro-colomar.es/>
Signature · 1 line
<https://www.alejandro-colomar.es/>
Hi!
Quoted 9 lines
Quoted 9 lines
The manual page
ioctl_pipe(2)has this synopsis:int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_SIZE, int size); int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_FILTER, struct watch_notification_filter *filter);Which says the $1 is an array of int (the type is declared as int[1]). However, this is incorrect, since the first argument is of course a plain int, a single file descriptor. Would you mind revising the page?
That looks indeed wrong, I suppose that we need just 'int pipefd' there.
And looking at the kernel both pipe file descriptors seems to get the exact same fops so it shouldn't matter on which end we call the ioctl().
Signature · 2 lines
Cyril Hrubis [email protected]
Alejandro Colomar
maintainerHi Cyril,
Quoted 7 lines · Cyril Hrubis
Hi!
Quoted 6 lines
Quoted 6 lines
The manual page
ioctl_pipe(2)has this synopsis:int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_SIZE, int size); int ioctl(int pipefd[1], IOC_WATCH_QUEUE_SET_FILTER, struct watch_notification_filter *filter);
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Which says the $1 is an array of int (the type is declared as int[1]). However, this is incorrect, since the first argument is of course a plain int, a single file descriptor. Would you mind revising the page?
That looks indeed wrong, I suppose that we need just 'int pipefd' there.
And looking at the kernel both pipe file descriptors seems to get the exact same fops so it shouldn't matter on which end we call the
ioctl().
Thanks! I've applied the patch below.
Have a lovely night!
Alex
commit b199d102db5be24e0ac88eb6879e3e3b6e0ea722 (HEAD -> contrib, alx/contrib) Author: Alejandro Colomar <[email protected]> Date: Mon Dec 23 22:25:54 2024 +0100 man/man2/ioctl_pipe.2: SYNOPSIS: Fix $1, which is not an array parameter Link: <https://lore.kernel.org/linux-man/20241214180423.2thsuyyfosrlyajb@devuan/T/#u> Reported-by: Alejandro Colomar <[email protected]> Suggested-by: Cyril Hrubis <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]> diff --git a/man/man2/ioctl_pipe.2 b/man/man2/ioctl_pipe.2 index 5f5c42652..fc15e1511 100644 --- a/man/man2/ioctl_pipe.2 +++ b/man/man2/ioctl_pipe.2 @@ -10,8 +10,8 @@ .SH SYNOPSIS .BR "#include <linux/watch_queue.h>" " /* Definition of " IOC_WATCH_QUEUE_ "* */" .B #include <sys/ioctl.h> .P -.BI "int ioctl(int " pipefd "[1], IOC_WATCH_QUEUE_SET_SIZE, int " size ); -.BI "int ioctl(int " pipefd "[1], IOC_WATCH_QUEUE_SET_FILTER," +.BI "int ioctl(int " pipefd ", IOC_WATCH_QUEUE_SET_SIZE, int " size ); +.BI "int ioctl(int " pipefd ", IOC_WATCH_QUEUE_SET_FILTER," .BI " struct watch_notification_filter *" filter ); .fi .SH DESCRIPTION
Quoted 5 lines
Signature · 3 lines
-- Cyril Hrubis [email protected]
Signature · 1 line
<https://www.alejandro-colomar.es/>