diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-05 09:07:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:35 -0400 |
commit | 6d1724925d4da49b84161f1440912205576b7935 (patch) | |
tree | e5adf312529fd2edf89ed7f992946eaf9213eefa | |
parent | 28720944d86b4d187360daa8be67dd22cb4e897b (diff) |
[media] DocBook: Add a chapter to describe media errors
There are several errors reported by V4L that aren't described.
They can occur on almost all ioctl's. Instead of adding them
into each ioctl, create a new chapter.
For V4L, the new chapter will automatically be listed on all
places, as there's a macro used everywhere there.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/DocBook/.gitignore | 2 | ||||
-rw-r--r-- | Documentation/DocBook/media/Makefile | 42 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/gen-errors.xml | 17 | ||||
-rw-r--r-- | Documentation/DocBook/media_api.tmpl | 7 |
4 files changed, 64 insertions, 4 deletions
diff --git a/Documentation/DocBook/.gitignore b/Documentation/DocBook/.gitignore index 25214a5ae14d..720f245ceb1f 100644 --- a/Documentation/DocBook/.gitignore +++ b/Documentation/DocBook/.gitignore | |||
@@ -8,5 +8,7 @@ | |||
8 | *.dvi | 8 | *.dvi |
9 | *.log | 9 | *.log |
10 | *.out | 10 | *.out |
11 | *.png | ||
12 | *.gif | ||
11 | media-indices.tmpl | 13 | media-indices.tmpl |
12 | media-entities.tmpl | 14 | media-entities.tmpl |
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index 8cb27f346d0d..6628b4b9cac4 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile | |||
@@ -100,23 +100,59 @@ STRUCTS = \ | |||
100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) | 100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) |
101 | 101 | ||
102 | ERRORS = \ | 102 | ERRORS = \ |
103 | E2BIG \ | ||
103 | EACCES \ | 104 | EACCES \ |
104 | EAGAIN \ | 105 | EAGAIN \ |
105 | EBADF \ | 106 | EBADF \ |
107 | EBADFD \ | ||
108 | EBADR \ | ||
109 | EBADRQC \ | ||
106 | EBUSY \ | 110 | EBUSY \ |
111 | ECHILD \ | ||
112 | ECONNRESET \ | ||
113 | EDEADLK \ | ||
114 | EDOM \ | ||
115 | EEXIST \ | ||
107 | EFAULT \ | 116 | EFAULT \ |
108 | EIO \ | 117 | EFBIG \ |
118 | EILSEQ \ | ||
119 | EINIT \ | ||
120 | EINPROGRESS \ | ||
109 | EINTR \ | 121 | EINTR \ |
110 | EINVAL \ | 122 | EINVAL \ |
123 | EIO \ | ||
124 | EMFILE \ | ||
111 | ENFILE \ | 125 | ENFILE \ |
126 | ENOBUFS \ | ||
127 | ENODATA \ | ||
128 | ENODEV \ | ||
129 | ENOENT \ | ||
130 | ENOIOCTLCMD \ | ||
112 | ENOMEM \ | 131 | ENOMEM \ |
113 | ENOSPC \ | 132 | ENOSPC \ |
133 | ENOSR \ | ||
134 | ENOSYS \ | ||
135 | ENOTSUP \ | ||
136 | ENOTSUPP \ | ||
114 | ENOTTY \ | 137 | ENOTTY \ |
115 | ENXIO \ | 138 | ENXIO \ |
116 | EMFILE \ | 139 | EOPNOTSUPP \ |
140 | EOVERFLOW \ | ||
117 | EPERM \ | 141 | EPERM \ |
118 | ERANGE \ | ||
119 | EPIPE \ | 142 | EPIPE \ |
143 | EPROTO \ | ||
144 | ERANGE \ | ||
145 | EREMOTE \ | ||
146 | EREMOTEIO \ | ||
147 | ERESTART \ | ||
148 | ERESTARTSYS \ | ||
149 | ESHUTDOWN \ | ||
150 | ESPIPE \ | ||
151 | ETIME \ | ||
152 | ETIMEDOUT \ | ||
153 | EUSERS \ | ||
154 | EWOULDBLOCK \ | ||
155 | EXDEV \ | ||
120 | 156 | ||
121 | ESCAPE = \ | 157 | ESCAPE = \ |
122 | -e "s/&/\\&/g" \ | 158 | -e "s/&/\\&/g" \ |
diff --git a/Documentation/DocBook/media/v4l/gen-errors.xml b/Documentation/DocBook/media/v4l/gen-errors.xml new file mode 100644 index 000000000000..1efc688ad665 --- /dev/null +++ b/Documentation/DocBook/media/v4l/gen-errors.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <title>Generic Error Codes</title> | ||
2 | |||
3 | <table frame="none" pgwide="1" id="gen-errors"> | ||
4 | <title>Generic error codes</title> | ||
5 | <tgroup cols="2"> | ||
6 | &cs-str; | ||
7 | <tbody valign="top"> | ||
8 | <row> | ||
9 | <entry>EBUSY</entry> | ||
10 | <entry>The ioctl can't be handled because the device is busy. This is | ||
11 | typically return while device is streaming, and an ioctl tried to | ||
12 | change something that would affect the stream, or would require the | ||
13 | usage of a hardware resource that was already allocated.</entry> | ||
14 | </row> | ||
15 | </tbody> | ||
16 | </tgroup> | ||
17 | </table> | ||
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index 88f2cc680cc2..c273e3c54fc5 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl | |||
@@ -8,7 +8,7 @@ | |||
8 | <!ENTITY ie "i. e."> | 8 | <!ENTITY ie "i. e."> |
9 | <!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>."> | 9 | <!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>."> |
10 | <!ENTITY i2c "I<superscript>2</superscript>C"> | 10 | <!ENTITY i2c "I<superscript>2</superscript>C"> |
11 | <!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately:</para>"> | 11 | <!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> |
12 | <!ENTITY manvol "<manvolnum>2</manvolnum>"> | 12 | <!ENTITY manvol "<manvolnum>2</manvolnum>"> |
13 | 13 | ||
14 | <!-- Table templates: structs, structs w/union, defines. --> | 14 | <!-- Table templates: structs, structs w/union, defines. --> |
@@ -110,6 +110,11 @@ Foundation. A copy of the license is included in the chapter entitled | |||
110 | &sub-media-controller; | 110 | &sub-media-controller; |
111 | </part> | 111 | </part> |
112 | 112 | ||
113 | <chapter id="gen_errors"> | ||
114 | &sub-gen-errors; | ||
115 | </chapter> | ||
116 | |||
117 | |||
113 | &sub-fdl-appendix; | 118 | &sub-fdl-appendix; |
114 | 119 | ||
115 | </book> | 120 | </book> |