doc-rst: linux_tv: supress lots of warnings
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / func-write.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _func-write:
4
5************
6V4L2 write()
7************
8
9*man v4l2-write(2)*
10
11Write to a V4L2 device
12
13
14Synopsis
15========
16
17.. code-block:: c
18
19 #include <unistd.h>
20
21
b7e67f6c 22.. cpp:function:: ssize_t write( int fd, void *buf, size_t count )
5377d91f
MH
23
24Arguments
25=========
26
27``fd``
28 File descriptor returned by :ref:`open() <func-open>`.
29
30``buf``
31``count``
32
33
34Description
35===========
36
37:c:func:`write()` writes up to ``count`` bytes to the device
38referenced by the file descriptor ``fd`` from the buffer starting at
39``buf``. When the hardware outputs are not active yet, this function
40enables them. When ``count`` is zero, :c:func:`write()` returns 0
41without any other effect.
42
43When the application does not provide more data in time, the previous
44video frame, raw VBI image, sliced VPS or WSS data is displayed again.
45Sliced Teletext or Closed Caption data is not repeated, the driver
46inserts a blank line instead.
47
48
49Return Value
50============
51
52On success, the number of bytes written are returned. Zero indicates
53nothing was written. On error, -1 is returned, and the ``errno``
54variable is set appropriately. In this case the next write will start at
55the beginning of a new frame. Possible error codes are:
56
57EAGAIN
58 Non-blocking I/O has been selected using the
59 :ref:`O_NONBLOCK <func-open>` flag and no buffer space was
60 available to write the data immediately.
61
62EBADF
63 ``fd`` is not a valid file descriptor or is not open for writing.
64
65EBUSY
66 The driver does not support multiple write streams and the device is
67 already in use.
68
69EFAULT
70 ``buf`` references an inaccessible memory area.
71
72EINTR
73 The call was interrupted by a signal before any data was written.
74
75EIO
76 I/O error. This indicates some hardware problem.
77
78EINVAL
79 The :c:func:`write()` function is not supported by this driver,
80 not on this device, or generally not on this type of device.
81
82
83.. ------------------------------------------------------------------------------
84.. This file was automatically converted from DocBook-XML with the dbxml
85.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
86.. from the linux kernel, refer to:
87..
88.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
89.. ------------------------------------------------------------------------------
This page took 0.027369 seconds and 5 git commands to generate.