diff options
author | jm22469 <none@none> | 2008-02-05 09:01:19 -0800 |
---|---|---|
committer | jm22469 <none@none> | 2008-02-05 09:01:19 -0800 |
commit | 1b83305cfc332b1e19ad6a194b73b2975e6bf79a (patch) | |
tree | 8bf803a14d9bbf1f261d97e19a1c18b8102f6973 /usr/src/uts/sparc/io/consplat.c | |
parent | 0280efdc4e507211851281715883a4b68445f267 (diff) | |
download | illumos-gate-1b83305cfc332b1e19ad6a194b73b2975e6bf79a.tar.gz |
6581309 inconsistent console behavior when not using the virtual console
6635697 qcn driver should support a polled io mode
Diffstat (limited to 'usr/src/uts/sparc/io/consplat.c')
-rw-r--r-- | usr/src/uts/sparc/io/consplat.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/usr/src/uts/sparc/io/consplat.c b/usr/src/uts/sparc/io/consplat.c index 5c4bf29453..6ca09e0b3a 100644 --- a/usr/src/uts/sparc/io/consplat.c +++ b/usr/src/uts/sparc/io/consplat.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -243,3 +243,29 @@ plat_tem_get_prom_pos(uint32_t *row, uint32_t *col) { prom_get_tem_pos(row, col); } + +/* + * Find the path of the virtual console (if available on the + * current architecture). + * + * Returns: -1 if not found, else actual path length. + */ +int +plat_virtual_console_path(char **bufp) +{ + pnode_t pnode; + int buflen; + static char buf[OBP_MAXPATHLEN]; + + pnode = prom_finddevice("/virtual-devices/console"); + + if (pnode == OBP_BADNODE) + return (-1); + + if ((buflen = prom_phandle_to_path(pnode, buf, sizeof (buf))) < 0) + return (-1); + + *bufp = buf; + + return (buflen); +} |