aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-18 15:36:06 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-18 15:36:06 +0000
commit7e9bbc9f53a613cd59bc9ce1421b6932a64df66a (patch)
tree31b34d2c0cf478c92dea629e8bb7f2b7d0f41b6d
parent58f8aead106a5c8a4b5fa54c0be7cb6d19dbfbbc (diff)
a couple of qemu-io fixes (Christoph Hellwig)
Fix two stupid bugs that I forgot to push out: - qiov->size already is in bytes, no need to shift it - actually use the supplied patter in the writev command Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7178 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--qemu-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 466d22cb39..703326dfb1 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -172,7 +172,7 @@ static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total)
while (async_ret == NOT_DONE)
qemu_aio_wait();
- *total = qiov->size >> 9;
+ *total = qiov->size;
return async_ret < 0 ? async_ret : 1;
}
@@ -634,7 +634,7 @@ writev_f(int argc, char **argv)
nr_iov = argc - optind;
qemu_iovec_init(&qiov, nr_iov);
- buf = p = qemu_io_alloc(count, 0xab);
+ buf = p = qemu_io_alloc(count, pattern);
for (i = 0; i < nr_iov; i++) {
size_t len;