diff options
| -rw-r--r-- | usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c b/usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c index 87057ec15c..e1dfeadef0 100644 --- a/usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c +++ b/usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * "PROM" interface */ @@ -84,18 +82,31 @@ kmdb_prom_free_ddi_prop(char *val) { } +/* + * This function is actually about checking if we are using + * local console versus serial console. Serial console can be named + * "ttyX" where X is [a-d], or "usb-serial". + */ int kmdb_prom_stdout_is_framebuffer(kmdb_auxv_t *kav) { char *dev; /* - * We can't use the official promif version, as we need to ensure that - * property lookups come from our property cache. + * The property "output-device" value is set in property cache, and + * is based on either "output-device" or "console" properties from + * the actual system. We can't use the official promif version, as we + * need to ensure that property lookups come from our property cache. */ if ((dev = kmdb_prom_get_ddi_prop(kav, "output-device")) == NULL) return (0); - return (strcmp(dev, "screen") == 0); + if (strncmp(dev, "tty", 3) == 0) + return (0); + if (strcmp(dev, "usb-serial") == 0) + return (0); + + /* Anything else is classified as local console. */ + return (1); } |
