Mercurial > mplayer.hg
diff libdha/sysdep/pci_mach386.c @ 4174:4cfb6b9a6da3
api changed: enable/disable_os_io returns error-code (or zero if ok) and pciconfig_read exported for mga_vid
author | alex |
---|---|
date | Tue, 15 Jan 2002 15:59:53 +0000 |
parents | 2e3262002acb |
children |
line wrap: on
line diff
--- a/libdha/sysdep/pci_mach386.c Tue Jan 15 15:31:30 2002 +0000 +++ b/libdha/sysdep/pci_mach386.c Tue Jan 15 15:59:53 2002 +0000 @@ -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); }