From patchwork Wed Oct 23 12:52:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Suchanek X-Patchwork-Id: 11206709 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BC7A1515 for ; Wed, 23 Oct 2019 12:53:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13FF320640 for ; Wed, 23 Oct 2019 12:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391877AbfJWMxP (ORCPT ); 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 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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