diff options
author | Egbert Eich <eich@suse.de> | 2005-01-28 16:13:00 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2005-01-28 16:13:00 +0000 |
commit | d23c46dd3e2cbf84012055bad43b1bb15809a244 (patch) | |
tree | 9dbac9b3afca0d75a150fcb5ff677b0332863a05 /hw/xfree86/os-support/linux/lnx_video.c | |
parent | 1562ec5cc3706acfac1db04366f78e4949ef5502 (diff) |
Modifying X.Org Xserver DDX to allow to run X with ordinary user
permissions when no access to HW registers is required. For API changes
which mostly involve the modifications to make the RRFunc (introduced
with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch
applies changes to OS specific files for other OSes which I cannot
test.
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_video.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_video.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index 4cd8152df..973a252dd 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -490,7 +490,7 @@ volatile unsigned char *ioBase = NULL; #endif -void +Bool xf86EnableIO(void) { #if defined(__powerpc__) @@ -499,7 +499,7 @@ xf86EnableIO(void) #endif if (ExtendedEnabled) - return; + return TRUE; #if defined(__powerpc__) ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0); @@ -512,16 +512,20 @@ xf86EnableIO(void) /* Should this be fatal or just a warning? */ #if 0 if (ioBase == MAP_FAILED) { - FatalError( + xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to map iobase (%s)\n", strerror(errno)); + return FALSE; } #endif } close(fd); #elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) - if (ioperm(0, 1024, 1) || iopl(3)) - FatalError("xf86EnableIOPorts: Failed to set IOPL for I/O\n"); + if (ioperm(0, 1024, 1) || iopl(3)) { + xf86Msg(X_WARNING, + "xf86EnableIOPorts: Failed to set IOPL for I/O\n"); + return FALSE; + } # if !defined(__alpha__) ioperm(0x40,4,0); /* trap access to the timer chip */ ioperm(0x60,4,0); /* trap access to the keyboard controller */ @@ -529,7 +533,7 @@ xf86EnableIO(void) #endif ExtendedEnabled = TRUE; - return; + return TRUE; } void |