summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2016-12-19 14:02:15 +0200
committerHans Rosenfeld <rosenfeld@grumpf.hope-2000.org>2017-01-10 23:08:58 +0100
commitbfc95aff2c09d9d96369a6adbb88af800afdcbd1 (patch)
treeaabc980ac2b9e79e76b1a7141f37e179b71f98a6
parentcfba4bc61aac6eae1889bf8e8750f7b6a2ee393f (diff)
downloadillumos-joyent-bfc95aff2c09d9d96369a6adbb88af800afdcbd1.tar.gz
7677 kmdb: intel system console value can not be screen
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com> Reviewed by: Adam Števko <adam.stevko@gmail.com> Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
-rw-r--r--usr/src/cmd/mdb/intel/kmdb/kmdb_promif_isadep.c21
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);
}