diff mbox series

[v2,5/8] docs: cdrom: Add autoclose IOCTL

Message ID 50579dae04d209c6fec62388c596d0e459fe56de.1571834862.git.msuchanek@suse.de (mailing list archive)
State Changes Requested
Headers show
Series Fix cdrom autoclose. | expand

Commit Message

Michal Suchanek Oct. 23, 2019, 12:52 p.m. UTC
This IOCTL will be used internally by the sr driver but there is no
reason to not document it for userspace.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 Documentation/ioctl/cdrom.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/ioctl/cdrom.rst b/Documentation/ioctl/cdrom.rst
index 3b4c0506de46..9372ff1b2b47 100644
--- a/Documentation/ioctl/cdrom.rst
+++ b/Documentation/ioctl/cdrom.rst
@@ -60,6 +60,7 @@  are as follows:
 	CDROM_LOCKDOOR		lock or unlock door
 	CDROM_DEBUG		Turn debug messages on/off
 	CDROM_GET_CAPABILITY	get capabilities
+	CDROM_AUTOCLOSE 	If autoclose enabled close the tray
 	CDROMAUDIOBUFSIZ	set the audio buffer size
 	DVD_READ_STRUCT		Read structure
 	DVD_WRITE_STRUCT	Write structure
@@ -1056,6 +1057,30 @@  CDROM_GET_CAPABILITY
 
 
 
+CDROM_AUTOCLOSE
+	Close the tray if the device has one, and autoclose is enabled.
+	Wait for drive to become ready.
+
+
+	usage::
+
+	  ioctl(fd, CDROM_AUTOCLOSE, 0);
+
+
+	inputs:
+		none
+
+
+	outputs:
+		The ioctl return value is 0 or an error code.
+
+
+	error return:
+	  - ENOMEDIUM	No medium found or drive error.
+	  - ERESTARTSYS	Received a signal while waiting for drive to become ready.
+
+
+
 CDROMAUDIOBUFSIZ
 	set the audio buffer size