linux/Documentation/media/uapi/mediactl/media-func-close.rst
Mauro Carvalho Chehab 5ccbb182d7 [media] docs-rst: Convert MC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation to make them to look more
like the rest of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:52 -03:00

48 lines
740 B
ReStructuredText

.. -*- coding: utf-8; mode: rst -*-
.. _media-func-close:
*************
media close()
*************
Name
====
media-close - Close a media device
Synopsis
========
.. code-block:: c
#include <unistd.h>
.. c:function:: int close( int fd )
:name: mc-close
Arguments
=========
``fd``
File descriptor returned by :c:func:`open() <mc-open>`.
Description
===========
Closes the media device. Resources associated with the file descriptor
are freed. The device configuration remain unchanged.
Return Value
============
:ref:`close() <media-func-close>` returns 0 on success. On error, -1 is returned, and
``errno`` is set appropriately. Possible error codes are:
EBADF
``fd`` is not a valid open file descriptor.