diff options
Diffstat (limited to 'src/linux_sysfs.c')
-rw-r--r-- | src/linux_sysfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 1ae9e52..7fcd327 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -325,10 +325,15 @@ pci_device_linux_sysfs_read_rom( struct pci_device * dev, void * buffer ) fd = open( name, O_RDWR ); if ( fd == -1 ) { +#ifdef LINUX_ROM /* If reading the ROM using sysfs fails, fall back to the old * /dev/mem based interface. + * disable this for newer kernels using configure */ return pci_device_linux_devmem_read_rom(dev, buffer); +#else + return errno; +#endif } |