forked from enlightenment/efl
ecore-drm: add error handling, when fail to setup tty.
Summary: need to restore vt to text mode, when failed to setup. @fix Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1777
This commit is contained in:
parent
08d0137987
commit
c280e2f711
|
@ -155,7 +155,7 @@ _ecore_drm_tty_setup(Ecore_Drm_Device *dev)
|
|||
if (ioctl(dev->tty.fd, KDSETMODE, KD_GRAPHICS))
|
||||
{
|
||||
ERR("Could not set graphics mode: %m");
|
||||
return EINA_FALSE;
|
||||
goto err_kmode;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,10 +166,14 @@ _ecore_drm_tty_setup(Ecore_Drm_Device *dev)
|
|||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue