Summary: need to restore vt to text mode, when failed to setup.
@fix
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1777
if (ioctl(dev->tty.fd, KDSETMODE, KD_GRAPHICS))
{
ERR("Could not set graphics mode: %m");
- return EINA_FALSE;
+ goto err_kmode;
}
}
if (ioctl(dev->tty.fd, VT_SETMODE, &vtmode) < 0)
{
ERR("Could not set Terminal Mode: %m");
- return EINA_FALSE;
+ goto err_setmode;
}
return EINA_TRUE;
+err_setmode:
+ ioctl(dev->tty.fd, KDSETMODE, KD_TEXT);
+err_kmode:
+ return EINA_FALSE;
}
/**