summaryrefslogtreecommitdiff
path: root/gpspipe.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-02-25 10:57:06 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-02-25 10:57:06 +0000
commite563b8140511cd36f09c4bd6858317cd08c3012a (patch)
tree732d262d0a03c8462d8e53091b98e28434121540 /gpspipe.c
parentf5fbcdfd3ccea470bd498522b80ac5c80212d112 (diff)
downloadgpsd-e563b8140511cd36f09c4bd6858317cd08c3012a.tar.gz
Support device selection in gpspipe.
Diffstat (limited to 'gpspipe.c')
-rw-r--r--gpspipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpspipe.c b/gpspipe.c
index 25cf33e1..e1c06d17 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -231,10 +231,10 @@ int main( int argc, char **argv)
gpsd_source_spec(argv[optind], &source);
} else
gpsd_source_spec(NULL, &source);
+
if (source.device != NULL) {
- (void)fprintf(stderr,
- "gpspipe: cannot accept device argument.\n");
- exit(1);
+ (void)strlcat(buf, "F=", sizeof(buf));
+ (void)strlcat(buf, source.device, sizeof(buf));
}
/* Daemonize if the user requested it. */