]> git.lizzy.rs Git - plan9front.git/commitdiff
add rdb message to /dev/reboot
authorcinap_lenrek <cinap_lenrek@centraldogma>
Thu, 12 May 2011 20:15:39 +0000 (20:15 +0000)
committercinap_lenrek <cinap_lenrek@centraldogma>
Thu, 12 May 2011 20:15:39 +0000 (20:15 +0000)
sys/src/9/port/devcons.c

index 5cd736662d41f70c2740d07a30ca4bccb699e502..e1b7a57f15635891a7b386e09eab5e0097461f0b 100644 (file)
@@ -32,6 +32,7 @@ enum
        CMhalt,
        CMreboot,
        CMpanic,
+       CMrdb,
 };
 
 Cmdtab rebootmsg[] =
@@ -39,6 +40,7 @@ Cmdtab rebootmsg[] =
        CMhalt,         "halt",         1,
        CMreboot,       "reboot",       0,
        CMpanic,        "panic",        0,
+       CMrdb,          "rdb",          0,
 };
 
 void
@@ -740,6 +742,11 @@ conswrite(Chan *c, void *va, long n, vlong off)
                case CMpanic:
                        *(ulong*)0=0;
                        panic("/dev/reboot");
+               case CMrdb:
+                       if(consdebug == nil)
+                               consdebug = rdb;
+                       consdebug();
+                       break;
                }
                poperror();
                free(cb);