diff options
author | kraxel <kraxel> | 2004-04-21 11:55:44 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2004-04-21 11:55:44 +0000 |
commit | c4d7dacb41039e087d20b8889a4d13bd4c9928f2 (patch) | |
tree | 0aef1f53f2e8cd55c4db8915d9d9a1265dd97adc /lsinput.c | |
download | input-c4d7dacb41039e087d20b8889a4d13bd4c9928f2.tar.gz |
Initial revision
Diffstat (limited to 'lsinput.c')
-rw-r--r-- | lsinput.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lsinput.c b/lsinput.c new file mode 100644 index 0000000..45f50e5 --- /dev/null +++ b/lsinput.c @@ -0,0 +1,35 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <fcntl.h> + +#include "input.h" + +/* ------------------------------------------------------------------ */ + +static void list_devices(void) +{ + int i,fd; + + for (i = 0; i < 32; i++) { + /* try to open */ + fd = device_open(i,1); + if (-1 == fd) + return; + device_info(fd); + close(fd); + } + return; +} + +int main(int argc, char *argv[]) +{ + list_devices(); + exit(0); +} + +/* --------------------------------------------------------------------- + * Local variables: + * c-basic-offset: 8 + * End: + */ |