This commit is contained in:
Kamil Trzcinski
2022-04-04 19:19:42 +02:00
parent 317fb65508
commit 0322dc920a
7 changed files with 86 additions and 131 deletions

4
v4l2.h
View File

@ -37,11 +37,11 @@ typedef struct {
fourcc_string fourcc_to_string(unsigned format);
unsigned fourcc_to_stride(unsigned width, unsigned format);
int xioctl(int fd, int request, void *arg);
int xioctl(const char *name, int fd, int request, void *arg);
#define E_XIOCTL(dev, _fd, _request, _value, _msg, ...) do { \
int ret; \
if ((ret = xioctl(_fd, _request, _value)) < 0) { \
if ((ret = xioctl(dev_name(dev), _fd, _request, _value)) < 0) { \
E_LOG_ERROR(dev, "xioctl(ret=%d): " _msg, ret, ##__VA_ARGS__); \
} \
} while(0)