From bd0afb7f3294cc60105542c25c8ca32109673993 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 24 Apr 2013 12:54:44 +0200 Subject: Support passing a custom hidraw device with -d --- ltunify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ltunify.c') diff --git a/ltunify.c b/ltunify.c index 01e1872..1402b4e 100644 --- a/ltunify.c +++ b/ltunify.c @@ -969,7 +969,14 @@ int main(int argc, char **argv) { } cmd = args[0]; - fd = open_hidraw(); + if (hidraw_path) { + fd = open(hidraw_path, O_RDWR); + if (fd < 0) { + perror(hidraw_path); + } + } else { + fd = open_hidraw(); + } if (fd < 0) { return 1; } -- cgit v1.2.1