Port-sgimips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ddb from crmfb console



Hi,

The attached patch makes ctrl-alt-esc work as expected from a crmfb
console. Is it the right way to do it?

-Tobias
Index: macekbc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sgimips/mace/macekbc.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 macekbc.c
--- macekbc.c   14 Apr 2007 15:11:39 -0000      1.2
+++ macekbc.c   7 Mar 2008 16:13:29 -0000
@@ -113,12 +113,6 @@ static struct pckbport_accessops macekbc
 static int
 macekbc_match(struct device *parent, struct cfdata *match, void *aux)
 {
-       const char *consdev;
-
-       /* XXX don't bother attaching if we're using a serial console */
-       consdev = ARCBIOS->GetEnvironmentVariable("ConsoleIn");
-       if (consdev == NULL || strcmp(consdev, "keyboard()") != 0)
-               return 0;
 
        return 1;
 }
@@ -130,6 +124,7 @@ macekbc_attach(struct device *parent, st
        struct macekbc_softc *sc;
        struct macekbc_internal *t;
        int slot;
+       const char *consdev;
 
        maa = aux;
        sc = device_private(self);
@@ -170,6 +165,10 @@ macekbc_attach(struct device *parent, st
        macekbc_reset(t, PCKBPORT_KBD_SLOT);
        macekbc_reset(t, PCKBPORT_AUX_SLOT);
 
+       consdev = ARCBIOS->GetEnvironmentVariable("ConsoleIn");
+       if (consdev != NULL && strcmp(consdev, "keyboard()") == 0)
+               pckbport_cnattach(t, &macekbc_ops, PCKBPORT_KBD_SLOT);
+
        t->t_pt = pckbport_attach(t, &macekbc_ops);
        if (pckbport_attach_slot(&sc->sc_dev, t->t_pt, PCKBPORT_KBD_SLOT))
                t->t_present[PCKBPORT_KBD_SLOT] = 1;
@@ -206,7 +205,7 @@ macekbc_intr(void *opaque)
                }
        }
 
-       return rv; 
+       return rv;
 }
 
 static void


Home | Main Index | Thread Index | Old Index