Make the failure message for drm_open_any() more specific

Do not suggest retrying as root if we already are.
This commit is contained in:
Chris Wilson 2013-07-03 10:02:27 +01:00
parent 9eb7d8950c
commit c6cec844f9

View File

@ -266,7 +266,8 @@ int drm_open_any(void)
int fd = __drm_open_any();
if (fd < -1) {
fprintf(stderr, "failed to open any drm device. retry as root?\n");
fprintf(stderr, "Failed to open any drm device.%s\n",
geteuid() ? "Retry as root?" : "");
return fd;
}