~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

Viewing changes to src/platform/graphics/mesa/display_helpers.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        BOOST_THROW_EXCEPTION(
66
66
            std::runtime_error("Failed to open DRM device for authenticated fd"));
67
67
 
 
68
    if (fcntl(auth_fd, F_SETFD, fcntl(auth_fd, F_GETFD) | FD_CLOEXEC) == -1)
 
69
    {
 
70
        BOOST_THROW_EXCEPTION(
 
71
            boost::enable_error_info(
 
72
                std::runtime_error("Failed to set FD_CLOEXEC for authenticated drm fd")));
 
73
    }
 
74
 
68
75
    drm_magic_t magic;
69
76
    int ret = -1;
70
77
    if ((ret = drmGetMagic(auth_fd, &magic)) < 0)
198
205
            continue;
199
206
 
200
207
        // If directly opening the DRM device is good enough for X it's good enough for us!
201
 
        tmp_fd = open(device.devnode(), O_RDWR, O_CLOEXEC);
 
208
        tmp_fd = open(device.devnode(), O_RDWR | O_CLOEXEC);
202
209
        if (tmp_fd < 0)
203
210
        {
204
211
            error = errno;