From b4772d15ab76edf3ba768a2c1af7c261d948a324 Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier Date: Sat, 27 Feb 2021 22:28:19 +0000 Subject: [PATCH] v3dv: Output a message if file open fails in physical_device_init In the caller, this error simply gets mapped to VK_ERROR_INIT[...]. Especially for users it is very valuable to know what the driver tried and what kind of failure occured. Thus just straight out log to stderr. Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index cf76716a6d8..40b2c00b4ec 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -613,6 +613,7 @@ physical_device_init(struct v3dv_physical_device *device, const char *path = drm_render_device->nodes[DRM_NODE_RENDER]; render_fd = open(path, O_RDWR | O_CLOEXEC); if (render_fd < 0) { + fprintf(stderr, "Opening %s failed: %s\n", path, strerror(errno)); result = VK_ERROR_INCOMPATIBLE_DRIVER; goto fail; }