LJ Archive

Listing 6. Finding a Unique Identifier

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);
LJ Archive