add rdb message to /dev/reboot

This commit is contained in:
cinap_lenrek 2011-05-12 20:15:39 +00:00
parent d390eb8884
commit 59aaec97ca

View 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);