video-xgi: fix incorrect function call to open() #23010

call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs 3
arguments

fd = open("/dev/fb", 'r') Second parm is incorrect,
changed to O_RDONLY as other distros did.

Tested for correct compilation on AMD64

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Gaetan Nadon
2009-07-28 21:52:34 -04:00
committed by Peter Hutterer
parent fff5d8cf8e
commit b085ad2f3e

View File

@@ -2590,7 +2590,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
FbDevExist = FALSE;
if((pXGI->Chipset != PCI_CHIP_XGIXG20)&&(pXGI->Chipset != PCI_CHIP_XGIXG21)&&( pXGI->Chipset != PCI_CHIP_XGIXG27 ))
{
if ((fd = open("/dev/fb", 'r')) != -1) {
if ((fd = open("/dev/fb", O_RDONLY)) != -1) {
PDEBUG(ErrorF("--- open /dev/fb.... \n"));
ioctl(fd, FBIOGET_FSCREENINFO, &fix);
if (fix.accel == FB_ACCEL_XGI_GLAMOUR) {