Find the answer to your Linux question:
Results 1 to 3 of 3
I have written one program in c language which list out all pci devices using /sys/bus/pci but there is one problem for /sys. This directory does not exist in Redhat ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    48

    Talking Pci device listing


    I have written one program in c language which list out all pci devices using /sys/bus/pci
    but there is one problem for /sys. This directory does not exist in Redhat 9. My program works well on FC5 & FC5. Can any body give me hint from where i can find the pci list.
    I know that i can get it from /proc but i don't want to use /proc.

    Any Good Suggestion will be apreaciated.

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Well, the pci-utils package includes a utility called "lspci" that does exactly this.

    You could either use lspci or look at its source code to see how they do it.

    http://mj.ucw.cz/pciutils.shtml

  3. #3
    Just Joined!
    Join Date
    Aug 2006
    Posts
    48

    Abt pciutils

    I do have pciutils source but it used /proc and i dont want to use /proc.

  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
  •