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 87d069be02112ecd1e1d75884bf9bbc713ce85a4..6ff4c173dab1ca08bafdd6e179cd6d6d0a09bc84 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();