projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3949f3c
)
intel: Do strerror on errno, not on the -1 return value from ioctl.
author
Eric Anholt
<eric@anholt.net>
Tue, 23 Sep 2008 17:47:21 +0000
(10:47 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 24 Sep 2008 00:10:04 +0000
(17:10 -0700)
libdrm/intel/intel_bufmgr_gem.c
patch
|
blob
|
history
diff --git
a/libdrm/intel/intel_bufmgr_gem.c
b/libdrm/intel/intel_bufmgr_gem.c
index
97e387f
..
cd36cdc
100644
(file)
--- 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);
}