Better error message on failure to set iopl. (Debian #021)
This commit is contained in:
parent
6d34a2ac8a
commit
c937faadd0
|
@ -29,6 +29,9 @@
|
|||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include "input.h"
|
||||
#include "scrnintstr.h"
|
||||
|
@ -567,8 +570,11 @@ xf86EnableIO(void)
|
|||
close(fd);
|
||||
#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__)
|
||||
if (ioperm(0, 1024, 1) || iopl(3)) {
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86EnableIOPorts: Failed to set IOPL for I/O\n");
|
||||
if (errno == ENODEV)
|
||||
ErrorF("xf86EnableIOPorts: no I/O ports found\n");
|
||||
else
|
||||
FatalError("xf86EnableIOPorts: failed to set IOPL"
|
||||
" for I/O (%s)\n", strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
# if !defined(__alpha__)
|
||||
|
|
Loading…
Reference in New Issue
Block a user