diff options
Diffstat (limited to 'libdha/sysdep/pci_mach386.c')
-rw-r--r-- | libdha/sysdep/pci_mach386.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libdha/sysdep/pci_mach386.c b/libdha/sysdep/pci_mach386.c index 32e2a657ff..31621862b8 100644 --- a/libdha/sysdep/pci_mach386.c +++ b/libdha/sysdep/pci_mach386.c @@ -4,18 +4,22 @@ Modified for readability by Nick Kurshev */ +#include <errno.h> + static int io_fd; -static __inline__ void enable_os_io(void) +static __inline__ int enable_os_io(void) { io_fd = -1 ; if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) { perror("/dev/iopl"); - exit(1); + return(errno); } + return(0); } -static __inline__ void disable_os_io(void) +static __inline__ int disable_os_io(void) { close(io_fd); + return(0); } |