Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    List PCI Devices

    I wanna write a program that lists all PCI devices on my PC.
    I want to use C on Linux.
    I am not in search of the command lspci. I do not want to browse the any of the text file listings of the devices within the linux tree structure.
    I want to write a separate program that uses the linux/pci.h and pci.c functions to list the PCI devices.

    I have tried including pci.c and using the function pci_find_device(1,1,NULL) but to no avail.

    I want to use a for loop and browse and display the entire listing of PCI devices on my system
    Please help .

  2. #2
    why not just use the:

    command? It's already there.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

Posting Permissions

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