Ticket #5146: get_pci_nth.patch

File get_pci_nth.patch, 863 bytes (added by BeSman, 8 years ago)

BeRometer works well now, but it needs a libmail from BeOS R5 becose it using some undocumented API from it, patch for haiku`s libmail is work-in-progress

  • src/system/libroot/os/arch/x86/compatibility.c

     
    1212#include <SupportDefs.h>
    1313#include <fs_info.h>
    1414#include <fs_volume.h>
    15 
     15#include <PCI.h>
    1616#include <syscalls.h>
    1717
    1818
     
    2626int mount(const char *filesystem, const char *where, const char *device, ulong flags,
    2727    void *parms, int len);
    2828int unmount(const char *path);
     29long get_nth_pci_info(long index, pci_info *info);
    2930
    30 
    3131int
    3232_kset_mon_limit_(int num)
    3333{
     
    142142    return 0;
    143143}
    144144
     145long get_nth_pci_info(long index,pci_info *info)
     146{
     147    pci_module_info *mod_info;
     148    if(mod_info->get_nth_pci_info(index,info))
     149        return B_NO_ERROR;
     150    else
     151        return B_ERROR;
     152}