diff options
author | Eric Anholt <eric@anholt.net> | 2008-09-23 10:47:21 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-09-23 17:10:04 -0700 |
commit | 1b3abe62b5751d0514d57aa850e584dca7dfc23e (patch) | |
tree | 0161bcf326167c88684e2034f4815fcb7220de50 /libdrm/intel | |
parent | 3949f3c9eaad9547fe046ca4d469fa7cc8f12304 (diff) |
intel: Do strerror on errno, not on the -1 return value from ioctl.
Diffstat (limited to 'libdrm/intel')
-rw-r--r-- | libdrm/intel/intel_bufmgr_gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index 97e387f5..cd36cdc7 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -357,7 +357,7 @@ intel_bo_gem_create_from_name(dri_bufmgr *bufmgr, const char *name, ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_GEM_OPEN, &open_arg); if (ret != 0) { fprintf(stderr, "Couldn't reference %s handle 0x%08x: %s\n", - name, handle, strerror(-ret)); + name, handle, strerror(errno)); free(bo_gem); return NULL; } @@ -401,7 +401,7 @@ dri_gem_bo_free(dri_bo *bo) if (ret != 0) { fprintf(stderr, "DRM_IOCTL_GEM_CLOSE %d failed (%s): %s\n", - bo_gem->gem_handle, bo_gem->name, strerror(-ret)); + bo_gem->gem_handle, bo_gem->name, strerror(errno)); } free(bo); } |