Hi Cyril, On Mon, Dec 16, 2024 at 11:23:44AM GMT, Cyril Hrubis wrote: > Hi! > > > 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(). Thanks! I've applied the patch below. Have a lovely night! Alex <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=b199d102db5be24e0ac88eb6879e3e3b6e0ea722> commit b199d102db5be24e0ac88eb6879e3e3b6e0ea722 (HEAD -> contrib, alx/contrib) Author: Alejandro Colomar <alx@xxxxxxxxxx> 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 <alx@xxxxxxxxxx> Suggested-by: Cyril Hrubis <chrubis@xxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx> 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 > > -- > Cyril Hrubis > chrubis@xxxxxxx > -- <https://www.alejandro-colomar.es/>
Attachment:
signature.asc
Description: PGP signature