autofs: update ioctl documentation regarding struct autofs_dev_ioctl
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 27 Feb 2017 22:27:08 +0000 (14:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Feb 2017 02:43:45 +0000 (18:43 -0800)
This is the same as bf72eda5 except that it's a different file.  Sync
documentation with changes made by 730c9eec in 2009.

Link: http://lkml.kernel.org/r/148577165630.9801.6081791213151121657.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/filesystems/autofs4-mount-control.txt
Documentation/filesystems/autofs4.txt

index 50a3e01a36f80c14b85cb6c1307531a00065a733..e5177cb31a040be01b5bf169e9e06d513596c64a 100644 (file)
@@ -179,6 +179,7 @@ struct autofs_dev_ioctl {
                                 * including this struct */
        __s32 ioctlfd;          /* automount command fd */
 
+       /* Command parameters */
        union {
                struct args_protover            protover;
                struct args_protosubver         protosubver;
index 75348631a3d884d518b4e60b2073c49e0ee4ff82..f10dd590f69fe3e9384ebf0b9d9ef87cd91f88e7 100644 (file)
@@ -425,8 +425,20 @@ Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure:
                                          * including this struct */
                 __s32 ioctlfd;          /* automount command fd */
 
-                __u32 arg1;             /* Command parameters */
-                __u32 arg2;
+               /* Command parameters */
+               union {
+                       struct args_protover            protover;
+                       struct args_protosubver         protosubver;
+                       struct args_openmount           openmount;
+                       struct args_ready               ready;
+                       struct args_fail                fail;
+                       struct args_setpipefd           setpipefd;
+                       struct args_timeout             timeout;
+                       struct args_requester           requester;
+                       struct args_expire              expire;
+                       struct args_askumount           askumount;
+                       struct args_ismountpoint        ismountpoint;
+               };
 
                 char path[0];
         };
@@ -446,24 +458,22 @@ Commands are:
     set version numbers.
 - **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**: return an open file descriptor
     on the root of an autofs filesystem.  The filesystem is identified
-    by name and device number, which is stored in `arg1`.  Device
-    numbers for existing filesystems can be found in
+    by name and device number, which is stored in `openmount.devid`.
+    Device numbers for existing filesystems can be found in
     `/proc/self/mountinfo`.
 - **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**: same as `close(ioctlfd)`.
 - **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**: if the filesystem is in
     catatonic mode, this can provide the write end of a new pipe
-    in `arg1` to re-establish communication with a daemon.  The
-    process group of the calling process is used to identify the
+    in `setpipefd.pipefd` to re-establish communication with a daemon.
+    The process group of the calling process is used to identify the
     daemon.
 - **AUTOFS_DEV_IOCTL_REQUESTER_CMD**: `path` should be a
     name within the filesystem that has been auto-mounted on.
-    On successful return, `arg1` and `arg2` will be the UID and GID
-    of the process which triggered that mount.
-
+    On successful return, `requester.uid` and `requester.gid` will be
+    the UID and GID of the process which triggered that mount.
 - **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**: Check if path is a
     mountpoint of a particular type - see separate documentation for
     details.
-
 - **AUTOFS_DEV_IOCTL_PROTOVER_CMD**:
 - **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**:
 - **AUTOFS_DEV_IOCTL_READY_CMD**:
@@ -473,7 +483,7 @@ Commands are:
 - **AUTOFS_DEV_IOCTL_EXPIRE_CMD**:
 - **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**:  These all have the same
     function as the similarly named **AUTOFS_IOC** ioctls, except
-    that **FAIL** can be given an explicit error number in `arg1`
+    that **FAIL** can be given an explicit error number in `fail.status`
     instead of assuming `ENOENT`, and this **EXPIRE** command
     corresponds to **AUTOFS_IOC_EXPIRE_MULTI**.