Opened 14 years ago

Last modified 8 years ago

#5146 closed bug

get_nth_pci_info missing — at Version 8

Reported by: andrewbachmann Owned by: axeld
Priority: low Milestone: R1
Component: System/libroot.so Version: R1/Development
Keywords: get_nth_pci_info Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by mmadia)

I was trying to run BeRometer to do some performance testing and it complains about this symbol missing. The symbol is in libroot.so on BeOS R 5.

Change History (9)

comment:1 by axeld, 14 years ago

But it's also private API. Nevertheless, a nice API to enumerate the hardware (something more/better than the info that is in the device tree) would be appreciated.

in reply to:  1 comment:2 by andrewbachmann, 14 years ago

Replying to axeld:

But it's also private API. Nevertheless, a nice API to enumerate the hardware (something more/better than the info that is in the device tree) would be appreciated.

Yeah, it's private API. Some other programs are also using it. Should we add a stub for the method/symbol and get around to flushing it out later when doing the stack of nice-to-haves?

by BeSman, 13 years ago

Attachment: get_pci_nth.patch added

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

comment:3 by BeSman, 13 years ago

patch: 01

in reply to:  3 ; comment:4 by siarzhuk, 13 years ago

Replying to BeSman:

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

long get_nth_pci_info(long index,pci_info *info) 
{ 
    pci_module_info *mod_info; 
    if(mod_info->get_nth_pci_info(index,info)) 
        return B_NO_ERROR; 
    else  
        return B_ERROR; 
}

Please explain what are you trying to do here. Thanks.

BTW, read the Coding Guidelines too. ;-)

comment:5 by BeSman, 13 years ago

Im provided a BeOS R5 compatible callback for get_nth_pci_info() function which we have in pci bus manager but not in libroot.so

in reply to:  4 comment:6 by phoudoin, 13 years ago

mod_info is unset, your code will most probably crash at pointer dereference on next line. You clearly never test this code ;-)

Last edited 13 years ago by phoudoin (previous) (diff)

comment:7 by anevilyak, 13 years ago

patch: 10

comment:8 by mmadia, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.