diff options
Diffstat (limited to 'mesalib/src/loader')
-rw-r--r-- | mesalib/src/loader/Makefile.am | 2 | ||||
-rw-r--r-- | mesalib/src/loader/loader.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/mesalib/src/loader/Makefile.am b/mesalib/src/loader/Makefile.am index c59663681..36ddba82b 100644 --- a/mesalib/src/loader/Makefile.am +++ b/mesalib/src/loader/Makefile.am @@ -35,7 +35,6 @@ libloader_la_CPPFLAGS = \ libloader_la_SOURCES = $(LOADER_C_FILES) libloader_la_LIBADD = -if NEED_OPENGL_COMMON if HAVE_DRICOMMON libloader_la_CPPFLAGS += \ -I$(top_srcdir)/src/mesa/drivers/dri/common/ \ @@ -52,7 +51,6 @@ libloader_la_LIBADD += \ -lm \ $(EXPAT_LIBS) endif -endif if !HAVE_LIBDRM libloader_la_CPPFLAGS += \ diff --git a/mesalib/src/loader/loader.c b/mesalib/src/loader/loader.c index 94c993ac8..9ff511522 100644 --- a/mesalib/src/loader/loader.c +++ b/mesalib/src/loader/loader.c @@ -207,9 +207,12 @@ libudev_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) } pci_id = udev_device_get_property_value(parent, "PCI_ID"); - if (pci_id == NULL || - sscanf(pci_id, "%x:%x", vendor_id, chip_id) != 2) { - log_(_LOADER_WARNING, "MESA-LOADER: malformed or no PCI ID\n"); + if (pci_id == NULL) { + log_(_LOADER_INFO, "MESA-LOADER: no PCI ID\n"); + *chip_id = -1; + goto out; + } else if (sscanf(pci_id, "%x:%x", vendor_id, chip_id) != 2) { + log_(_LOADER_WARNING, "MESA-LOADER: malformed PCI ID\n"); *chip_id = -1; goto out; } |