projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4869d3d
)
gpiomon: don't ignore superfluous arguments
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Wed, 14 Jun 2017 10:53:19 +0000
(12:53 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Wed, 14 Jun 2017 10:53:19 +0000
(12:53 +0200)
We don't currently support watching more than one line at a time. Bail
out if the user gives us more than two non-option arguments.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/tools/gpiomon.c
patch
|
blob
|
history
diff --git
a/src/tools/gpiomon.c
b/src/tools/gpiomon.c
index afc511b98aed306ada55d182f5a28f78618bf61b..6b984b985eca360d0872ba15cdc546e97fd54c5e 100644
(file)
--- a/
src/tools/gpiomon.c
+++ b/
src/tools/gpiomon.c
@@
-158,6
+158,9
@@
int main(int argc, char **argv)
if (argc < 2)
die("GPIO line offset must be specified");
+ if (argc > 2)
+ die("watching more than one GPIO line unsupported");
+
device = argv[0];
offset = strtoul(argv[1], &end, 10);
if (*end != '\0' || offset > INT_MAX)