Skip to content

Commit 67ffcab

Browse files
bagasmeJonathan Corbet
authored andcommitted
Documentation: ioctl-number: Shorten macros table
The macros table has three columns: the second one is "an" and the third one writes "an ioctl with ... parameters". Simplify the table by adding heading row that indicates macro name and accepted parameters. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20250715024258.16882-2-bagasdotme@gmail.com
1 parent 44bdcff commit 67ffcab

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Documentation/userspace-api/ioctl/ioctl-number.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ Michael Elizabeth Chastain
1010
If you are adding new ioctl's to the kernel, you should use the _IO
1111
macros defined in <linux/ioctl.h>:
1212

13-
====== == ============================================
14-
_IO an ioctl with no parameters
15-
_IOW an ioctl with write parameters (copy_from_user)
16-
_IOR an ioctl with read parameters (copy_to_user)
17-
_IOWR an ioctl with both write and read parameters.
18-
====== == ============================================
13+
====== ===========================
14+
macro parameters
15+
====== ===========================
16+
_IO none
17+
_IOW write (read from userspace)
18+
_IOR read (write to userpace)
19+
_IOWR write and read
20+
====== ===========================
1921

2022
'Write' and 'read' are from the user's point of view, just like the
2123
system calls 'write' and 'read'. For example, a SET_FOO ioctl would

0 commit comments

Comments
 (0)