列表 6. 查找唯一标识符

if(ioctl(fd, EVIOCGUNIQ(sizeof(uniq)), uniq) < 0) {
    perror("event ioctl");
}

printf("The device on %s says its identity is %s\n",
       argv[1], uniq);
© . All rights reserved.