intel: ioctl is not defined to return -errno
authorKeith Packard <keithp@keithp.com>
Fri, 17 Oct 2008 04:15:01 +0000 (21:15 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 17 Oct 2008 06:54:19 +0000 (23:54 -0700)
Don't count on ioctl returning -errno; use errno directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
libdrm/intel/intel_bufmgr_gem.c

index 33853c4..081eb2a 100644 (file)
@@ -790,7 +790,7 @@ dri_gem_bo_exec(dri_bo *bo, int used,
 
     do {
        ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER, &execbuf);
-    } while (ret == -EAGAIN);
+    } while (ret != 0 && errno == EAGAIN);
 
     intel_update_buffer_offsets (bufmgr_gem);