summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/sys/boot/i386/libi386/comconsole.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/boot/sys/boot/i386/libi386/comconsole.c b/usr/src/boot/sys/boot/i386/libi386/comconsole.c
index 29ed725b89..f4cd9b32fb 100644
--- a/usr/src/boot/sys/boot/i386/libi386/comconsole.c
+++ b/usr/src/boot/sys/boot/i386/libi386/comconsole.c
@@ -139,12 +139,14 @@ struct console ttyd = {
static void
comc_probe(struct console *cp)
{
- struct serial *port;
- char name[20];
- char value[20];
- char *cons, *env;
+ struct serial *port;
+ char name[20];
+ char value[20];
+ char *cons, *env;
+
+ if (cp->c_private != NULL)
+ return;
- if (cp->c_private == NULL) {
cp->c_private = malloc(sizeof(struct serial));
port = cp->c_private;
port->speed = COMSPEED;
@@ -224,8 +226,7 @@ comc_probe(struct console *cp)
unsetenv(name);
env_setenv(name, EV_VOLATILE, env, comc_pcidev_set, env_nounset);
- }
- comc_setup(cp);
+ comc_setup(cp);
}
static int