summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 992a92a)
raw | patch | inline | side by side (parent: 992a92a)
author | Jyri Sarha <jsarha@ti.com> | |
Tue, 29 Sep 2015 09:15:29 +0000 (12:15 +0300) | ||
committer | Jyri Sarha <jsarha@ti.com> | |
Tue, 29 Sep 2015 09:49:45 +0000 (12:49 +0300) |
libkms++/card.cpp | patch | blob | history |
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 3dea542d5123c2caac5574bcf0383fcafeab45ca..626c424be365610c07119489e5b6f7a1726ccf61 100644 (file)
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
int fd = open(card, O_RDWR | O_CLOEXEC);
if (fd < 0)
- throw invalid_argument("foo");
+ throw invalid_argument((string(strerror(errno)) +
+ " opening " + card).c_str());
m_fd = fd;
int r;
r = drmSetClientCap(m_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
if (r)
- throw invalid_argument("foo");
+ throw invalid_argument("Can't set universal planes");
r = drmSetClientCap(m_fd, DRM_CLIENT_CAP_ATOMIC, 1);
m_has_atomic = r == 0;
uint64_t has_dumb;
r = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &has_dumb);
if (r || !has_dumb)
- throw invalid_argument("foo");
+ throw invalid_argument("Dumb buffers not available");
auto res = drmModeGetResources(m_fd);
if (!res)
- throw invalid_argument("foo");
+ throw invalid_argument("Can't get card resources");
for (int i = 0; i < res->count_connectors; ++i) {
uint32_t id = res->connectors[i];