if (b.memory == V4L2_MEMORY_MMAP) {
tprintf(", m.offset=%#x", b.m.offset);
} else if (b.memory == V4L2_MEMORY_USERPTR) {
- tprintf(", m.userptr=%#lx",
- (unsigned long) b.m.userptr);
+ tprints(", m.userptr=");
+ printaddr((unsigned long) b.m.userptr);
}
tprintf(", length=%u, bytesused=%u, flags=",
b.length, b.bytesused);
printflags(v4l2_buf_flags, b.flags, "V4L2_BUF_FLAG_???");
- if (code == VIDIOC_DQBUF)
- tprintf(", timestamp = {%ju.%06ju}",
- (uintmax_t)b.timestamp.tv_sec,
- (uintmax_t)b.timestamp.tv_usec);
+ if (code == VIDIOC_DQBUF) {
+ tprints(", timestamp = ");
+ MPERS_FUNC_NAME(print_struct_timeval)(&b.timestamp);
+ }
tprints(", ...");
}
tprints("}");
tprints(", ");
if (!umove_or_printaddr(tcp, arg, &b)) {
- tprintf("{capability=%#x, flags=%#x, base=%#lx}",
- b.capability, b.flags, (unsigned long) b.base);
+ tprintf("{capability=%#x, flags=%#x, base=",
+ b.capability, b.flags);
+ printaddr((unsigned long) b.base);
+ tprints("}");
}
return RVAL_DECODED | 1;
tprints("}");
return 1;
}
- if (tcp->auxstr)
+ if (get_tcb_priv_ulong(tcp))
tprints(" => ");
}
- if (entering(tcp) || tcp->auxstr) {
+ if (entering(tcp) || get_tcb_priv_ulong(tcp)) {
#ifdef V4L2_CTRL_FLAG_NEXT_CTRL
- tcp->auxstr = (c.id & V4L2_CTRL_FLAG_NEXT_CTRL) ? "" : NULL;
- if (tcp->auxstr) {
+ const unsigned long next = c.id & V4L2_CTRL_FLAG_NEXT_CTRL;
+ set_tcb_priv_ulong(tcp, next);
+ if (next) {
tprints("V4L2_CTRL_FLAG_NEXT_CTRL|");
c.id &= ~V4L2_CTRL_FLAG_NEXT_CTRL;
}
#include "xlat/v4l2_control_classes.h"
-static int
-umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr,
- const unsigned int len, void *our_addr)
-{
- if (!addr) {
- tprints("NULL");
- return -1;
- }
- if (umoven(tcp, addr, len, our_addr) < 0) {
- tprintf("%#lx", addr);
- return -1;
- }
- return 0;
-}
-
static int
print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get)
{
}
#endif /* VIDIOC_CREATE_BUFS */
-MPERS_PRINTER_DECL(int, v4l2_ioctl)(struct tcb *tcp, const unsigned int code, const long arg)
+MPERS_PRINTER_DECL(int, v4l2_ioctl,
+ struct tcb *tcp, const unsigned int code, const long arg)
{
if (!verbose(tcp))
return RVAL_DECODED;