[media] Spec: document CREATE_BUFS behavior if count == 0
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 22 Jun 2012 08:47:30 +0000 (05:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jul 2012 20:29:39 +0000 (17:29 -0300)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml

index a2474ecb574acd06c533f7a22bd4c5fbccacc4c6..5e73b1c8d09543183d3c388916a29f8d91dfdd0f 100644 (file)
@@ -97,7 +97,13 @@ information.</para>
          <row>
            <entry>__u32</entry>
            <entry><structfield>count</structfield></entry>
-           <entry>The number of buffers requested or granted.</entry>
+           <entry>The number of buffers requested or granted. If count == 0, then
+           <constant>VIDIOC_CREATE_BUFS</constant> will set <structfield>index</structfield>
+           to the current number of created buffers, and it will check the validity of
+           <structfield>memory</structfield> and <structfield>format.type</structfield>.
+           If those are invalid -1 is returned and errno is set to &EINVAL;,
+           otherwise <constant>VIDIOC_CREATE_BUFS</constant> returns 0. It will
+           never set errno to &EBUSY; in this particular case.</entry>
          </row>
          <row>
            <entry>__u32</entry>