glx: Log the filename of the drm device if we fail to open it
authorAdam Jackson <ajax@redhat.com>
Fri, 27 Sep 2019 16:16:22 +0000 (12:16 -0400)
committerAdam Jackson <ajax@nwnk.net>
Mon, 30 Sep 2019 15:30:16 +0000 (15:30 +0000)
Helps point the user to the specific device that's having issues, since
you're increasingly likely to have more than one.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/107
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glx/dri2_glx.c

index bed25bb38d609b40334234d270c2bf4188a42c15..d2a9c881357c75b9ab3783ccd2e440a68fe57c0a 100644 (file)
@@ -1244,7 +1244,7 @@ dri2CreateScreen(int screen, struct glx_display * priv)
 
    psc->fd = loader_open_device(deviceName);
    if (psc->fd < 0) {
-      ErrorMessageF("failed to open drm device: %s\n", strerror(errno));
+      ErrorMessageF("failed to open %s: %s\n", deviceName, strerror(errno));
       goto handle_error;
    }