* Re: ioctl_pipe(2): SYNOPSIS: $1 [not found] <20241214180348.pp4vrlnxqpo6cus6@devuan> @ 2024-12-14 18:04 ` Alejandro Colomar 2024-12-16 10:23 ` Cyril Hrubis 0 siblings, 1 reply; 3+ messages in thread From: Alejandro Colomar @ 2024-12-14 18:04 UTC (permalink / raw) To: Cyril Hrubis; +Cc: David Howells, linux-man [-- Attachment #1: Type: text/plain, Size: 773 bytes --] Oops, I forgot to CC the linux-man@ list. Fixed now. On Sat, Dec 14, 2024 at 07:03:51PM +0100, Alejandro Colomar wrote: > > 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! > Alex > > -- > <https://www.alejandro-colomar.es/> -- <https://www.alejandro-colomar.es/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioctl_pipe(2): SYNOPSIS: $1 2024-12-14 18:04 ` ioctl_pipe(2): SYNOPSIS: $1 Alejandro Colomar @ 2024-12-16 10:23 ` Cyril Hrubis 2024-12-23 21:29 ` Alejandro Colomar 0 siblings, 1 reply; 3+ messages in thread From: Cyril Hrubis @ 2024-12-16 10:23 UTC (permalink / raw) To: Alejandro Colomar; +Cc: David Howells, linux-man 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(). -- Cyril Hrubis chrubis@suse.cz ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioctl_pipe(2): SYNOPSIS: $1 2024-12-16 10:23 ` Cyril Hrubis @ 2024-12-23 21:29 ` Alejandro Colomar 0 siblings, 0 replies; 3+ messages in thread From: Alejandro Colomar @ 2024-12-23 21:29 UTC (permalink / raw) To: Cyril Hrubis; +Cc: David Howells, linux-man [-- Attachment #1: Type: text/plain, Size: 2371 bytes --] 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@kernel.org> 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@kernel.org> Suggested-by: Cyril Hrubis <chrubis@suse.cz> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org> 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@suse.cz > -- <https://www.alejandro-colomar.es/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-23 21:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241214180348.pp4vrlnxqpo6cus6@devuan>
2024-12-14 18:04 ` ioctl_pipe(2): SYNOPSIS: $1 Alejandro Colomar
2024-12-16 10:23 ` Cyril Hrubis
2024-12-23 21:29 ` Alejandro Colomar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox