Fix build of syslet engine on x86-64
[fio.git] / engines / syslet-rw.c
index 40298cbd24496a3811ee28950d4def7bf22df01a..b635f6440d1fd1089bfb9150e892f58c3358cc2a 100644 (file)
@@ -1,5 +1,8 @@
 /*
- * read/write() engine that uses syslet to be async
+ * syslet engine
+ *
+ * IO engine that does regular pread(2)/pwrite(2) to transfer data, but
+ * with syslets to make the execution async.
  *
  */
 #include <stdio.h>
@@ -7,6 +10,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <assert.h>
+#include <asm/unistd.h>
 
 #include "../fio.h"
 #include "../os.h"
@@ -46,7 +50,7 @@ static void fio_syslet_complete_atom(struct thread_data *td,
 
                io_u = atom->private;
                ret = *atom->ret_ptr;
-               if (ret > 0)
+               if (ret >= 0)
                        io_u->resid = io_u->xfer_buflen - ret;
                else if (ret < 0)
                        io_u->error = ret;