History log of /external/strace/v4l2.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fffe50d321653a90fa288ed0b486c2537c203955 26-Aug-2015 Dmitry V. Levin <ldv@altlinux.org> Fix build on systems that lack VIDIOC_CREATE_BUFS definition

* v4l2.c (v4l2_ioctl): Check that v4l2_ioctl is defined.
/external/strace/v4l2.c
e459ba943e5b64dd7a2f80416bf04458b3c6f0ab 20-May-2015 Philippe De Muyter <phdm@macqel.be> v4l2: add decoding for VIDIOC_S_CROP's arg

* v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_S_CROP's arg.
/external/strace/v4l2.c
86b4fb5bc5408652f1ba86eb91dc4cc7b10e937a 19-May-2015 Philippe De Muyter <phdm@macqel.be> v4l2: VIDIOC_CROPCAP: add missing braces around arg printout

* v4l2.c (v4l2_ioctl): case VIDIOC_CROPCAP: add missing braces around arg
printout.
/external/strace/v4l2.c
6779e71accc195a3030d8a16d4eb76d9bc623769 18-Apr-2015 Philippe De Muyter <phdm@macqel.be> v4l2: add decoding for VIDIOC_CREATE_BUFS's arg.

* v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_CREATE_BUFS's arg.
/external/strace/v4l2.c
bfe6d04d9c73de1f3fd5b28d115fa80202fd1776 26-Feb-2015 Mike Frysinger <vapier@gentoo.org> v4l2: use uintmax_t for times

There is no guarantee that the backing value for the various time fields
are ints or longs which makes printfs annoying. Lets cast them to the
uintmax_t type so we can use the j flag and not worry about truncation.

* v4l2.c (v4l2_ioctl): Use j and uintmax_t when printing tv_sec/tv_usec.
/external/strace/v4l2.c
d67ba3e434d72e884a459e662496c0b9a6ac5f17 23-Feb-2015 Dmitry V. Levin <ldv@altlinux.org> Fix compilation warnings about incompatible print formats

On some platforms printing of __s64 types with "%lld" format,
or __u64 types with "%llu" or "%llx" formats causes a warning
that __s64/__u64 type is not compatible with long long format.
From my PoV, this is nonsense, but the workaround costs nothing.

* scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Cast __u64 types
to (unsigned long long).
* v4l2.c (v4l2_ioctl): Likewise. Cast __s64 type to (long long).
/external/strace/v4l2.c
0f4ad30bdcb284a8e874b3d9345cb203c8cc5209 22-Feb-2015 Dmitry V. Levin <ldv@altlinux.org> Fix build with old kernel headers

* strace.c (print_debug_info, maybe_allocate_tcb, print_signalled,
print_exited): Remove "const" qualifier from status variable to
workaround some old implementations of WIFSIGNALED/WIFSTOPPED/WIFEXITED
macros.
* v4l2.c: Include <linux/types.h>.
(v4l2_ioctl): Check that V4L2_CTRL_FLAG_NEXT_CTRL and VIDIOC_S_EXT_CTRLS
macros are defined.
* tests/Makefile.am (AM_CPPFLAGS): Define.
/external/strace/v4l2.c
f0a5b083c9968ee924520ec69f6e54a2487dee91 25-Jan-2015 Dmitry V. Levin <ldv@altlinux.org> v4l2: quote pixelformat

* v4l2.c (print_pixelformat): Output in quoted v4l2_fourcc() format.
/external/strace/v4l2.c
1de59cf7460674e3eb13886bb5baf014389debd4 26-Jan-2015 Dmitry V. Levin <ldv@altlinux.org> v4l2: quote strings

* v4l2.c (v4l2_ioctl): Print strings using print_quoted_string.
/external/strace/v4l2.c
c7afb4881f14e44968f3a78ae5988f04ecc66b68 19-Jan-2015 Dmitry V. Levin <ldv@altlinux.org> ioctl: assume that all ioctl commands have unsigned int type

In linux, ioctl command number has a 32-bit unsigned integer type:
fs/ioctl.c:SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
If the kernel completely ignores other bits on 64-bit architectures,
why should strace care?
Let's follow the kernel and treat it as unsigned int.

* defs.h (struct_ioctlent): Change "code" type to "unsigned int".
(ioctl_decode, ioctl_lookup, block_ioctl, loop_ioctl, mtd_ioctl,
ubi_ioctl, ptp_ioctl, scsi_ioctl, sock_ioctl, term_ioctl, rtc_ioctl,
v4l2_ioctl): Likewise.
* ioctl.c (ioctl_decode, ioctl_lookup, compare, ioctl_next_match):
Likewise.
* block.c (block_ioctl): Likewise.
* loop.c (loop_ioctl): Likewise.
* mtd.c (mtd_ioctl, ubi_ioctl): Likewise.
* ptp.c (ptp_ioctl): Likewise.
* scsi.c (scsi_ioctl): Likewise.
* sock.c (sock_ioctl): Likewise.
* term.c (term_ioctl): Likewise.
* time.c (rtc_ioctl): Likewise.
* v4l2.c (v4l2_ioctl): Likewise.
* ioctlsort.c (struct ioctlent, compare, main): Likewise.
/external/strace/v4l2.c
197db577e832ad033954885e2a3a7fad4046968c 09-Jan-2015 Dmitry V. Levin <ldv@altlinux.org> v4l2: fix build on systems with older kernel headers

* v4l2.c (print_v4l2_format_fmt): Do not use
V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY unless it is defined.
(v4l2_ioctl): Do not use VIDIOC_ENUM_FRAMESIZES and
VIDIOC_ENUM_FRAMEINTERVALS unless they are defined.
/external/strace/v4l2.c
0cc961440b527ff8c16954fc411a1529072edb92 03-Nov-2014 Philippe De Muyter <phdm@macqel.be> Implement Video4Linux video-input ioctls decoder

Introduce v4l2.c, a decoder for the arguments of the video-input subset
of the v4l2 ioctl's. This is a combination of
- previous work by Peter Zotov <whitequark@whitequark.org>, found at
https://gist.githubusercontent.com/whitequark/1263207/raw/strace-4.6-v4l2-ioctls.patch
- previous work by William Manley <will@williammanley.net>, found at
http://marc.info/?l=strace&m=139395588520675
- forward port, additions and fixes by Philippe De Muyter <phdm@macqel.be>

As v4l2 is a moving target, I have made v4l2.c compilable with ancient
linux kernels by testing the availability of some macros. It has been
succesfully compiled on linux 3.10, 3.1, 2.6.31 and 2.6.22, and
succesfully used on linux 3.10 with a camera device.

* configure.ac: Check for availabilty of V4L2_* enum constants.
* Makefile.am (strace_SOURCES): Add v4l2.c.
* defs.h (v4l2_ioctl): New prototype.
* ioctl.c (ioctl_decode): Use v4l2_ioctl.
* v4l2.c: New file.
* xlat/v4l2_*.in: New files.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Cc: Peter Zotov <whitequark@whitequark.org>
Cc: William Manley <will@williammanley.net>
/external/strace/v4l2.c