Esempio n. 1
0
int
loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
{
#if HAVE_LIBDRM
   if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id))
      return 1;
#endif
   return 0;
}
Esempio n. 2
0
static int
loader_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
{
   if (libudev_get_pci_id_for_fd(fd, vendor_id, chip_id))
      return 1;
   if (sysfs_get_pci_id_for_fd(fd, vendor_id, chip_id))
      return 1;
   if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id))
      return 1;
   return 0;
}