Fix logic in MOD_LOAD handler to call dcons_attach after all successful

dcons_drv_init invocations. Testing return value for 0 does not work for
cases where dcons_drv_init was called already as part of low level
console initialization.
This commit is contained in:
kan 2009-04-06 02:29:28 +00:00
parent 0cc8805d6d
commit 3726ab2d40

View File

@ -403,8 +403,9 @@ dcons_modevent(module_t mode, int type, void *data)
switch (type) {
case MOD_LOAD:
ret = dcons_drv_init(1);
if (ret == 0) {
if (ret != -1)
dcons_attach();
if (ret == 0) {
dcons_cnprobe(&dcons_consdev);
dcons_cninit(&dcons_consdev);
cnadd(&dcons_consdev);