X-Git-Url: http://git.scottworley.com/keystroke-timestamps/blobdiff_plain/1f7b1e94856a3ca10ae48bef124560094a25f58e..HEAD:/keystroke-timestamps.c?ds=inline diff --git a/keystroke-timestamps.c b/keystroke-timestamps.c index 97936c6..e0433bf 100644 --- a/keystroke-timestamps.c +++ b/keystroke-timestamps.c @@ -27,7 +27,7 @@ int main (int argc, char **argv) {0, 0, 0, 0 }, }; while (1) { - int c = getopt_long(argc, argv, "", long_options, NULL); + int c = getopt_long(argc, argv, "d:o:", long_options, NULL); if (c == -1) break; if (c == 'd') { device = optarg; @@ -79,7 +79,7 @@ int main (int argc, char **argv) struct input_event i; while (1) { fd_set ready_inputs = all_inputs; - if (select(maxfd+1, &ready_inputs, NULL, NULL, NULL) != 1) { + if (select(maxfd+1, &ready_inputs, NULL, NULL, NULL) < 1) { err(EX_IOERR, "select"); } for (int fd=0; fd <= maxfd; fd++) {