2016-06-30 15:18:56 +02:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
|
|
|
.. _media-func-close:
|
|
|
|
|
|
|
|
*************
|
|
|
|
media close()
|
|
|
|
*************
|
|
|
|
|
2016-07-05 15:14:35 -03:00
|
|
|
Name
|
2016-07-05 07:58:48 -03:00
|
|
|
====
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2016-07-05 07:58:48 -03:00
|
|
|
media-close - Close a media device
|
2016-06-30 15:18:56 +02:00
|
|
|
|
2016-07-05 15:14:35 -03:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 15:18:56 +02:00
|
|
|
========
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
2016-08-19 12:00:43 -03:00
|
|
|
.. c:function:: int close( int fd )
|
2016-08-19 16:59:55 -03:00
|
|
|
:name: mc-close
|
2016-07-05 07:58:48 -03:00
|
|
|
|
2016-07-05 15:14:35 -03:00
|
|
|
Arguments
|
2016-06-30 15:18:56 +02:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
2016-08-19 16:59:55 -03:00
|
|
|
File descriptor returned by :c:func:`open() <mc-open>`.
|
2016-06-30 15:18:56 +02:00
|
|
|
|
|
|
|
|
2016-07-05 15:14:35 -03:00
|
|
|
Description
|
2016-06-30 15:18:56 +02:00
|
|
|
===========
|
|
|
|
|
|
|
|
Closes the media device. Resources associated with the file descriptor
|
|
|
|
are freed. The device configuration remain unchanged.
|
|
|
|
|
|
|
|
|
2016-07-05 15:14:35 -03:00
|
|
|
Return Value
|
2016-06-30 15:18:56 +02:00
|
|
|
============
|
|
|
|
|
2016-07-05 17:12:37 -03:00
|
|
|
:ref:`close() <media-func-close>` returns 0 on success. On error, -1 is returned, and
|
2016-06-30 15:18:56 +02:00
|
|
|
``errno`` is set appropriately. Possible error codes are:
|
|
|
|
|
|
|
|
EBADF
|
|
|
|
``fd`` is not a valid open file descriptor.
|