Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1128192ybg; Wed, 23 Oct 2019 10:46:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyICOEsK5r3TE/ej0cW2Ug04PfDXKdVnn+2eCs81RcHMV1JItvoGBJjy/NrK9cFEEsnLwOe X-Received: by 2002:a17:906:fcac:: with SMTP id qw12mr33483595ejb.31.1571852766330; Wed, 23 Oct 2019 10:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571852766; cv=none; d=google.com; s=arc-20160816; b=t2Fgs1B8qfrLaS5onjPWay+CbcmyRfbhNeZdPzlVwq6hNGYs6Sny9CojwQPzMQoCr4 nQ7FRbeKSpHnFxkhrC10sll35U+4aFlNK5Wn9pA7ODpVdVQPNKBA2+79ws1L3fHHdLM3 erCU1Nywpb8fTEFdPN5nxQL6laZFkpNwV7luN3z8WySMg2jh7x7xjQb7wCQB7EwNxWXu hRJoztmmGqaKNXhP5G6EokkQQ11E9esEx2OqUX5a2uQyHqhfJr8yM9Jb7GhtuBGuRSYz 3NSwusnWXD0vJhbUmtJWUx7+ga+3MgIP0eOxBPE+W/L+KbAMN+xroHk2gA1mNZI5RZLa gE5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Wd+M0kHam15DoefBwkczLNRYyFwVk+e1TSk+gIbyKpM=; b=CDYC5W3sqDun7Vtq4gsoXxfaNOBYRF03SNwbzhYybef9e9FtSS4yAFPVZaIYiP1LFF dhYln6J45tZjUGmusHTkplc1wRCttIyzdKyscMAQ1Cm9Ff0kCPrW5U7NtcnmJ1iu99f+ 6mM7W8MBwHJQrbhInCgvy4DHoGOLi6jf3iMAyLoZ1CjWjppzu/JJJFwqVpzogpTjJ2aE XMwnOF/SeTENwUih/hbzudODP+BZ7Z9aty3zwCLt2ub5v9sW5lubDdSU5idZ8SweNkLV iQFW8Ns9zKCfqIpMSyZ61+rqez/BNrs3VKeqpez1RmlOjtBk7bmKzkCpmmcNTvgiZj5/ qtWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30si8732342edb.372.2019.10.23.10.45.42; Wed, 23 Oct 2019 10:46:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391882AbfJWMxP (ORCPT + 99 others); Wed, 23 Oct 2019 08:53:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:49390 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391852AbfJWMxO (ORCPT ); Wed, 23 Oct 2019 08:53:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 76FE6B67A; Wed, 23 Oct 2019 12:53:12 +0000 (UTC) From: Michal Suchanek To: linux-scsi@vger.kernel.org Cc: Michal Suchanek , Jonathan Corbet , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , Alexander Viro , Mauro Carvalho Chehab , Eric Biggers , "J. Bruce Fields" , Benjamin Coddington , Hannes Reinecke , Omar Sandoval , Ming Lei , Damien Le Moal , Bart Van Assche , Tejun Heo , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 5/8] docs: cdrom: Add autoclose IOCTL Date: Wed, 23 Oct 2019 14:52:44 +0200 Message-Id: <50579dae04d209c6fec62388c596d0e459fe56de.1571834862.git.msuchanek@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Documentation/ioctl/cdrom.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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 -- 2.23.0