aboutsummaryrefslogtreecommitdiff
path: root/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drm')
-rw-r--r--drm/drmdevice.cpp2
-rw-r--r--drm/drmeventlistener.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/drm/drmdevice.cpp b/drm/drmdevice.cpp
index bcb9ddd..bef41d8 100644
--- a/drm/drmdevice.cpp
+++ b/drm/drmdevice.cpp
@@ -126,7 +126,7 @@ std::tuple<int, int> DrmDevice::Init(const char *path, int num_displays) {
/* TODO: Use drmOpenControl here instead */
fd_.Set(open(path, O_RDWR));
if (fd() < 0) {
- ALOGE("Failed to open dri- %s", strerror(-errno));
+ ALOGE("Failed to open dri %s: %s", path, strerror(errno));
return std::make_tuple(-ENODEV, 0);
}
diff --git a/drm/drmeventlistener.cpp b/drm/drmeventlistener.cpp
index 8f655a7..ccee0d6 100644
--- a/drm/drmeventlistener.cpp
+++ b/drm/drmeventlistener.cpp
@@ -38,7 +38,7 @@ DrmEventListener::DrmEventListener(DrmDevice *drm)
int DrmEventListener::Init() {
uevent_fd_.Set(socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT));
if (uevent_fd_.get() < 0) {
- ALOGE("Failed to open uevent socket %d", uevent_fd_.get());
+ ALOGE("Failed to open uevent socket: %s", strerror(errno));
return uevent_fd_.get();
}
@@ -50,7 +50,7 @@ int DrmEventListener::Init() {
int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr));
if (ret) {
- ALOGE("Failed to bind uevent socket %d", -errno);
+ ALOGE("Failed to bind uevent socket: %s", strerror(errno));
return -errno;
}