[PATCH] uml: return a real error code
do_aio used to return -1 on error instead of errno.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index e942beb..298d563 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -117,6 +117,8 @@
err = io_submit(ctx, 1, &iocbp);
if(err > 0)
err = 0;
+ else
+ err = -errno;
out:
return err;