struct udev_device *device, *parent;
struct udev_list_entry *entry;
const char *pci_id, *path;
- const char *usub;
+ const char *usub, *dnode;
int fd;
udev = udev_new();
pci_id = udev_device_get_property_value(parent, "PCI_ID");
if (fnmatch(pci_glob, pci_id, 0) != 0)
continue;
- fd = open(udev_device_get_devnode(device), O_RDWR);
+ dnode = udev_device_get_devnode(device);
+ if (strstr(dnode, "control"))
+ continue;
+ fd = open(dnode, O_RDWR);
if (fd < 0)
continue;
if ((flags & DRM_TEST_MASTER) && !is_master(fd)) {
if (fd < 0) {
fprintf(stderr, "failed to open any drm device\n");
- abort();
+ exit(0);
}
return fd;
if (fd < 0) {
fprintf(stderr, "failed to open any drm device\n");
- abort();
+ exit(0);
}
return fd;