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