diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-02 16:45:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-02 16:45:53 -0400 |
commit | be2f368054331d3ecf0d1006bf683eb40f224daf (patch) | |
tree | 3ab02d9144ed9625e4fbaa27307ae6a9d8bec0d9 /gpsmon.c | |
parent | 466a626ed1bda0680da82d21cbb31f637efa9a3e (diff) | |
download | gpsd-be2f368054331d3ecf0d1006bf683eb40f224daf.tar.gz |
When -t forces a driver type, show it in the gpsmon prompt.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -513,6 +513,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } break; + case 'T': case 't': fallback = NULL; for (active = monitor_objects; *active; active++) { @@ -523,11 +524,11 @@ int main(int argc, char **argv) } } if (matches > 1) { - (void)fprintf(stderr, "-T option matched more than one driver.\n"); + (void)fprintf(stderr, "-t option matched more than one driver.\n"); exit(EXIT_FAILURE); } else if (matches == 0) { - (void)fprintf(stderr, "-T option didn't match any driver.\n"); + (void)fprintf(stderr, "-t option didn't match any driver.\n"); exit(EXIT_FAILURE); } active = NULL; @@ -686,6 +687,11 @@ int main(int argc, char **argv) /* refresh all windows */ (void)wprintw(cmdwin, type_name); + if (fallback != NULL) { + waddch(cmdwin, '('); + waddstr(cmdwin, (*fallback)->driver->type_name); + waddch(cmdwin, ')'); + } (void)wprintw(cmdwin, "> "); (void)wclrtoeol(cmdwin); if (active != NULL |