可以发现,这个宏用的很好,简洁易扩展,自己写代码可以学习下
#define IOCTL_INFO(_ioctl, _func, _debug, _flags) \[_IOC_NR(_ioctl)] = { \.ioctl = _ioctl, \.flags = _flags, \.name = #_ioctl, \.func = _func, \.debug = _debug, \}
static const char *v4l2_memory_names[] = {[V4L2_MEMORY_MMAP] = "mmap",[V4L2_MEMORY_USERPTR] = "userptr",[V4L2_MEMORY_OVERLAY] = "overlay",[V4L2_MEMORY_DMABUF] = "dmabuf",
};