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@ffwll.ch Cc: Keith Packard keithp@keithp.com Signed-off-by: Ben Widawsky ben@bwidawsk.net --- 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; }