summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBagas Sanjaya <bagasdotme@gmail.com>2025-07-15 09:42:57 +0700
committerJonathan Corbet <corbet@lwn.net>2025-07-15 14:04:30 -0600
commit67ffcabd2d935949387bb616247566d3c28122e0 (patch)
treebeee8cd8b7406761d48c8691623ff3c740ce4bbd
parent44bdcff53f012f4e78a749dd818f38283b9d2fbc (diff)
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
-rw-r--r--Documentation/userspace-api/ioctl/ioctl-number.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst
index 24c7f480e310..cbc65019879b 100644
--- a/Documentation/userspace-api/ioctl/ioctl-number.rst
+++ b/Documentation/userspace-api/ioctl/ioctl-number.rst
@@ -10,12 +10,14 @@ Michael Elizabeth Chastain
If you are adding new ioctl's to the kernel, you should use the _IO
macros defined in <linux/ioctl.h>:
- ====== == ============================================
- _IO an ioctl with no parameters
- _IOW an ioctl with write parameters (copy_from_user)
- _IOR an ioctl with read parameters (copy_to_user)
- _IOWR an ioctl with both write and read parameters.
- ====== == ============================================
+ ====== ===========================
+ macro parameters
+ ====== ===========================
+ _IO none
+ _IOW write (read from userspace)
+ _IOR read (write to userpace)
+ _IOWR write and read
+ ====== ===========================
'Write' and 'read' are from the user's point of view, just like the
system calls 'write' and 'read'. For example, a SET_FOO ioctl would