Mir

Merge lp:~vanvugt/mir/fix-1292384 into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: no longer in the source branch.
Merged at revision: 1478
Proposed branch: lp:~vanvugt/mir/fix-1292384
Merge into: lp:mir
Diff against target: 21 lines (+2/-2)
1 file modified
src/platform/graphics/mesa/display_helpers.cpp (+2/-2)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1292384
Reviewer Review Type Date Requested Status
Alexandros Frantzis (community) Approve
Alan Griffiths Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+210975@code.launchpad.net

Commit message

Pass a useful (positive) errno to boost so it can produce useful error
messages (LP: #1292384)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Unfortunately error can also be set from drmSetInterfaceVersion() - and that does need the "-"

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Well I've only ever seen it throw with a negative error, but can support both.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platform/graphics/mesa/display_helpers.cpp'
2--- src/platform/graphics/mesa/display_helpers.cpp 2014-03-12 02:46:58 +0000
3+++ src/platform/graphics/mesa/display_helpers.cpp 2014-03-17 02:10:47 +0000
4@@ -219,7 +219,7 @@
5 sv.drm_dd_major = -1; /* Don't care */
6 sv.drm_dd_minor = -1; /* Don't care */
7
8- if ((error = drmSetInterfaceVersion(tmp_fd, &sv)))
9+ if ((error = -drmSetInterfaceVersion(tmp_fd, &sv)))
10 {
11 close(tmp_fd);
12 tmp_fd = -1;
13@@ -238,7 +238,7 @@
14 {
15 BOOST_THROW_EXCEPTION(
16 boost::enable_error_info(
17- std::runtime_error("Error opening DRM device")) << boost::errinfo_errno(-error));
18+ std::runtime_error("Error opening DRM device")) << boost::errinfo_errno(error));
19 }
20
21 return tmp_fd;

Subscribers

People subscribed via source and target branches