标签:命令 == bsp led def nbsp current int define
#define CMD_ERR_PRINT(devname, cmd, arg) do { \
char *p[4] = {"", "W", "R", "WR"}; \
if (0 == _IOC_DIR(cmd)) { \
printk(KERN_ERR "ERROR: /dev/%s not find cmd(%#x): _IO(‘%c‘, %d), called by pname=%s, pid=%d\n", \
devname, cmd, _IOC_TYPE(cmd), _IOC_NR(cmd), current->comm, current->pid); \
} else { \
printk(KERN_ERR "ERROR: /dev/%s not find cmd(%#x): _IO%s(‘%c‘, %d, 0x%p), called by pname=%s, pid=%d\n", \
devname, cmd, p[_IOC_DIR(cmd)], _IOC_TYPE(cmd), _IOC_NR(cmd), (void *)arg, current->comm, current->pid); \
} \
} while (0)
__user
标签:命令 == bsp led def nbsp current int define
原文地址:https://www.cnblogs.com/chuck11/p/12344510.html