fix linuxfb crash on program start
the KDGETMODE ioctl should use a pointer to int as param, not a pointer to pointer to int, otherwise it may crash Change-Id: Ie255d240f3b6ca1ff5398f972308116135374ae3 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
This commit is contained in:
parent
d3c4296198
commit
ffd912a51d
@ -264,7 +264,7 @@ static int openTtyDevice(const QString &device)
|
||||
|
||||
static bool switchToGraphicsMode(int ttyfd, int *oldMode)
|
||||
{
|
||||
ioctl(ttyfd, KDGETMODE, &oldMode);
|
||||
ioctl(ttyfd, KDGETMODE, oldMode);
|
||||
if (*oldMode != KD_GRAPHICS) {
|
||||
if (ioctl(ttyfd, KDSETMODE, KD_GRAPHICS) != 0)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user