add rdb message to /dev/reboot
This commit is contained in:
parent
d390eb8884
commit
59aaec97ca
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,7 @@ enum
|
||||||
CMhalt,
|
CMhalt,
|
||||||
CMreboot,
|
CMreboot,
|
||||||
CMpanic,
|
CMpanic,
|
||||||
|
CMrdb,
|
||||||
};
|
};
|
||||||
|
|
||||||
Cmdtab rebootmsg[] =
|
Cmdtab rebootmsg[] =
|
||||||
|
@ -39,6 +40,7 @@ Cmdtab rebootmsg[] =
|
||||||
CMhalt, "halt", 1,
|
CMhalt, "halt", 1,
|
||||||
CMreboot, "reboot", 0,
|
CMreboot, "reboot", 0,
|
||||||
CMpanic, "panic", 0,
|
CMpanic, "panic", 0,
|
||||||
|
CMrdb, "rdb", 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -740,6 +742,11 @@ conswrite(Chan *c, void *va, long n, vlong off)
|
||||||
case CMpanic:
|
case CMpanic:
|
||||||
*(ulong*)0=0;
|
*(ulong*)0=0;
|
||||||
panic("/dev/reboot");
|
panic("/dev/reboot");
|
||||||
|
case CMrdb:
|
||||||
|
if(consdebug == nil)
|
||||||
|
consdebug = rdb;
|
||||||
|
consdebug();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
poperror();
|
poperror();
|
||||||
free(cb);
|
free(cb);
|
||||||
|
|
Loading…
Reference in a new issue