summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen LaHaise <bcrl@kvack.org>2002-09-16 22:45:18 +0000
committerBen LaHaise <bcrl@kvack.org>2002-09-16 22:45:18 +0000
commit841fe4ad5306890f798816725ea35e0470eae9ff (patch)
tree9122161ae5fee6d734b63476add0e3dd26258bcf
parent0cf2b27c836aa2db083bfb6f0c81d0ec187c31b8 (diff)
downloadlibaio-841fe4ad5306890f798816725ea35e0470eae9ff.tar.gz
libaio now actually does work on ia64
-rw-r--r--harness/Makefile4
-rw-r--r--harness/cases/13.t6
-rw-r--r--src/libaio.h6
-rw-r--r--src/syscall-ia64.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/harness/Makefile b/harness/Makefile
index c396d82..d2483fd 100644
--- a/harness/Makefile
+++ b/harness/Makefile
@@ -1,5 +1,5 @@
# foo.
-TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n)
+TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2)
PROGS:=$(patsubst %.t,%.p,$(TEST_SRCS))
HARNESS_SRCS:=main.c
# io_queue.c
@@ -33,5 +33,5 @@ testdir/rwfile: .PHONY
chmod 600 $@
check: $(PROGS) testdir/rofile testdir/rwfile testdir/wofile
- ./runtests.sh `/bin/ls -d $(PROGS) | sort -n`
+ ./runtests.sh $(PROGS)
diff --git a/harness/cases/13.t b/harness/cases/13.t
index d128a25..5f18005 100644
--- a/harness/cases/13.t
+++ b/harness/cases/13.t
@@ -43,7 +43,7 @@ int test_main(void)
if (res != 1) {
status |= 1;
printf("io_getevents failed [%d] with res=%d [%s]\n",
- i, res, strerror(-res));
+ i, res, (res < 0) ? strerror(-res) : "okay");
break;
}
@@ -54,13 +54,13 @@ int test_main(void)
printf("event[%d]: write[%d] %s, returned: %ld [%s]\n",
i, (int)(iocb - &iocbs[0]),
(event.res != SIZE) ? "failed" : "okay",
- (long)event.res, strerror(-event.res)
+ (long)event.res,
+ (event.res < 0) ? strerror(-event.res) : "okay"
);
}
res = ftruncate(rwfd, 0); assert(res == 0);
res = close(rwfd); assert(res == 0);
- res = unlink("testdir/rwfile"); assert(res == 0);
return status;
}
diff --git a/src/libaio.h b/src/libaio.h
index ac09231..fa03ed9 100644
--- a/src/libaio.h
+++ b/src/libaio.h
@@ -65,10 +65,8 @@ struct io_iocb_sockaddr {
}; /* result code is the length of the sockaddr, or -'ve errno */
struct io_iocb_common {
- void *buf;
- unsigned __pad1;
- long nbytes;
- unsigned __pad2;
+ PADDEDptr(void *buf, __pad1);
+ PADDEDul(nbytes, __pad2);
long long offset;
long long __pad3, __pad4;
}; /* result code is the amount read or -'ve errno */
diff --git a/src/syscall-ia64.h b/src/syscall-ia64.h
index c590547..484e97c 100644
--- a/src/syscall-ia64.h
+++ b/src/syscall-ia64.h
@@ -11,6 +11,8 @@
" mov r15=" SYMSTR( __NR_ ## name ) "\n" \
" break 0x100000\n" \
" ;;\n" \
+ " cmp.eq p6,p0=-1,r10\n" \
+ " ;;\n" \
" (p6) sub r8=0,r8\n" \
" br.ret.sptk.few b0\n" \
".size " SYMSTR(name) ", . - " SYMSTR(name) "\n" \