jsfw/hid.c

18 lines
314 B
C
Raw Normal View History

2022-08-27 19:29:43 -05:00
#include <stdlib.h>
#include <dirent.h>
#include <stdio.h>
void hid_main() {
DIR *d;
struct dirent *dir;
d = opendir("/sys/class/hidraw");
if(d) {
while ((dir = readdir(d)) != NULL) {
if(dir->d_type != DT_LNK) continue;
printf("%s\n", dir->d_ino);
}
closedir(d);
}
exit(0);
}