projects
/
project
/
ugps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bail out if we can't find GPS device
[project/ugps.git]
/
main.c
diff --git
a/main.c
b/main.c
index
87d069b
..
6ff4c17
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-145,7
+145,10
@@
main(int argc, char ** argv)
conn.path = ubus_socket;
conn.cb = ubus_connect_handler;
ubus_auto_connect(&conn);
- nmea_open(argv[1], &stream, B4800);
+
+ if (nmea_open(device, &stream, B4800) < 0)
+ return -1;
+
uloop_run();
uloop_done();