mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
Log drmGetDevices2 error code
This commit is contained in:
parent
af78ecb86b
commit
5c699f09cb
3 changed files with 6 additions and 6 deletions
|
@ -156,7 +156,7 @@ static int open_drm_render_node(void) {
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
int devices_len = drmGetDevices2(flags, NULL, 0);
|
int devices_len = drmGetDevices2(flags, NULL, 0);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
||||||
|
@ -167,7 +167,7 @@ static int open_drm_render_node(void) {
|
||||||
devices_len = drmGetDevices2(flags, devices, devices_len);
|
devices_len = drmGetDevices2(flags, devices, devices_len);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
free(devices);
|
free(devices);
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ static char *get_render_name(const char *name) {
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
int devices_len = drmGetDevices2(flags, NULL, 0);
|
int devices_len = drmGetDevices2(flags, NULL, 0);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
||||||
|
@ -129,7 +129,7 @@ static char *get_render_name(const char *name) {
|
||||||
devices_len = drmGetDevices2(flags, devices, devices_len);
|
devices_len = drmGetDevices2(flags, devices, devices_len);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
free(devices);
|
free(devices);
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -704,7 +704,7 @@ static char *get_render_name(const char *name) {
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
int devices_len = drmGetDevices2(flags, NULL, 0);
|
int devices_len = drmGetDevices2(flags, NULL, 0);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
drmDevice **devices = calloc(devices_len, sizeof(drmDevice *));
|
||||||
|
@ -715,7 +715,7 @@ static char *get_render_name(const char *name) {
|
||||||
devices_len = drmGetDevices2(flags, devices, devices_len);
|
devices_len = drmGetDevices2(flags, devices, devices_len);
|
||||||
if (devices_len < 0) {
|
if (devices_len < 0) {
|
||||||
free(devices);
|
free(devices);
|
||||||
wlr_log(WLR_ERROR, "drmGetDevices2 failed");
|
wlr_log(WLR_ERROR, "drmGetDevices2 failed: %s", strerror(-devices_len));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue