From e1b88200a8585644c4deeec0e0d9e3e79c30c03d Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Tue, 28 Jul 2009 21:52:34 -0400 Subject: [PATCH] video-xgi: fix incorrect function call to open() #23010 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 --- src/xgi_driver.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/xgi_driver.c b/src/xgi_driver.c index 950e69e..f7e7747 100644 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -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) { -- 1.6.0.4