Anyone aware of what this will break? It seems to be a much nicer thing to do for callers. If people do not like it, I will probably just create a #define drmIoctl2 or some such thing. Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> Cc: Keith Packard <keithp@xxxxxxxxxx> Signed-off-by: Ben Widawsky <ben@xxxxxxxxxxxx> --- xf86drm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xf86drm.c b/xf86drm.c index 6ea068f..015203d 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -166,6 +166,10 @@ drmIoctl(int fd, unsigned long request, void *arg) do { ret = ioctl(fd, request, arg); } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); + + if (ret) + return -errno; + return ret; } -- 1.7.10.3 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel