Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, Please help me in finding the Hardware ID of all PCI devices from /proc. How can I read these datas from the /proc/bus/pci directory ussing C program? Thanks & ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    1

    Getting Hardware information


    Hello,
    Please help me in finding the Hardware ID of all PCI devices from /proc.

    How can I read these datas from the /proc/bus/pci directory ussing C program?

    Thanks & regards
    Praveenbk

  2. #2
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    Instead of reading data from /proc/bus/pci, u can use lspci or scanpci to get all the details related to ur hardware devices.
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

  3. #3
    Linux Newbie dilbert's Avatar
    Join Date
    Sep 2006
    Location
    Yorkshire, GB
    Posts
    237
    Depends also on what do you want to achieve.

    Simply looking into those files you can with "cat /proc/bus/pci/devices". Everything there that is not a directory is a file and you can read it that way.

    If you want to read the proc file systems from a C program, grep over the driver source tree. There is a lot of driver source files that write to or read from the proc file system.
    Bus Error: Passengers dumped. Hech gap yo'q.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •