summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-13 07:18:12 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-13 07:18:12 -0500
commitde40beae4f09f7d86f4832640bb9ed60708275e7 (patch)
tree6b45eab8023146ee38218101521c5eb40c9dcf70 /gpsctl.c
parent37f8f82db8fa029e8362c48ad4d7409f5aa2e048 (diff)
downloadgpsd-de40beae4f09f7d86f4832640bb9ed60708275e7.tar.gz
In gpsctl, make client mode ID operation report the device subtype.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 99a5dc7a..5d4bff81 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -455,11 +455,16 @@ int main(int argc, char **argv)
/* if no control operation was specified, just ID the device */
if (speed==NULL && rate == NULL && !to_nmea && !to_binary && !reset) {
- gpsd_report(context.debug, LOG_SHOUT,
- "%s identified as %s at %d\n",
- gpsdata.dev.path,
- gpsdata.dev.driver,
- gpsdata.dev.baudrate);
+ (void)printf("%s identified as a %s",
+ gpsdata.dev.path, gpsdata.dev.driver);
+ if (gpsdata.dev.subtype[0] != '\0') {
+ (void)fputc(' ', stdout);
+ (void)fputs(gpsdata.dev.subtype, stdout);
+ }
+ if (gpsdata.dev.baudrate > 0)
+ (void)printf(" at %u baud", gpsdata.dev.baudrate);
+ (void)fputc('.', stdout);
+ (void)fputc('\n', stdout);
}
status = 0;