Access to hardware informations from an user-space program

John-Mark Gurney jmg at funkthat.com
Sat Nov 30 04:37:37 UTC 2013


Nomad Esst wrote this message on Thu, Nov 28, 2013 at 01:13 -0800:
> Hi list
> How can I do so? By hardware informations I mean which card is located on which slot, card serial number, manufacturer and ... . I know some utils do this e.g. dmesg, pciconf but I want to write something on my own.
> Any suggestion is appreciated.

dmesg just reads the kernel buffer, but you are correct that pci conf
does read this info..  Why don't you read the source for pciconf?  If
you installed the source, it's availabe in /usr/src/usr.sbin/pciconf?

Or you can read it on the web at:
https://svnweb.freebsd.org/base/head/usr.sbin/pciconf/

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-drivers mailing list