* defs.h (umoven_or_printaddr_ignore_syserror): New prototype.
* v4l2.c (umoven_or_printaddr_ignore_syserror): Move ...
* util.c: ... here.
extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *);
#define umove_or_printaddr(pid, addr, objp) \
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
+extern int
+umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr,
+ const unsigned int len, void *our_addr);
extern int umovestr(struct tcb *, long, unsigned int, char *);
extern int upeek(int pid, long, long *);
return 0;
}
+int
+umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr,
+ const unsigned int len, void *our_addr)
+{
+ if (!addr || !verbose(tcp) || umoven(tcp, addr, len, our_addr) < 0) {
+ printaddr(addr);
+ return -1;
+ }
+ return 0;
+}
+
/*
* Like `umove' but make the additional effort of looking
* for a terminating zero byte.
#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 || !verbose(tcp) || umoven(tcp, addr, len, our_addr) < 0) {
- printaddr(addr);
- return -1;
- }
- return 0;
-}
-
static int
print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get)
{