]> www.infradead.org Git - users/willy/xarray.git/commitdiff
Documentation: ioctl-number: Shorten macros table
authorBagas Sanjaya <bagasdotme@gmail.com>
Tue, 15 Jul 2025 02:42:57 +0000 (09:42 +0700)
committerJonathan Corbet <corbet@lwn.net>
Tue, 15 Jul 2025 20:04:30 +0000 (14:04 -0600)
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
Documentation/userspace-api/ioctl/ioctl-number.rst

index 24c7f480e3105729325f934b291909bb691d0149..cbc65019879bccbc0ccb065830b87f46acd11563 100644 (file)
@@ -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