aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 11:13:04 +0200
committerAvi Kivity <avi@redhat.com>2009-12-07 11:13:04 +0200
commit25ae2ddd778002a6ea3633beca2ac6f6635af6a3 (patch)
tree96ba2d4b50812ffb507a10c0319817594dadc61e /posix-aio-compat.c
parentMerge commit 'a0fb002c6462d21ceb9eac8c5772e469ec189374' into upstream-merge (diff)
parentmonitor: use qemu_gettimeofday(), not gettimeofday() (diff)
downloadqemu-kvm-25ae2ddd778002a6ea3633beca2ac6f6635af6a3.tar.gz
qemu-kvm-25ae2ddd778002a6ea3633beca2ac6f6635af6a3.tar.bz2
qemu-kvm-25ae2ddd778002a6ea3633beca2ac6f6635af6a3.zip
Merge commit 'd08d6f04d6eeedce5090ff66d0676162d7d8d788' into upstream-merge
* commit 'd08d6f04d6eeedce5090ff66d0676162d7d8d788': (23 commits) monitor: use qemu_gettimeofday(), not gettimeofday() win32: fix variable use before initialization monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32 Sparc64: fix compilation with DEBUG_MMU ide: implement stub for audio control/volume read ide: Use some already defined page macros instead of constants eepro100: Improve debug messages Remove rule for config-devices.h eepro100: Allocate a larger buffer for regname() multiboot: Use signed type for negative error numbers posix-aio-compat: Fix error check qemu-img: Fix memory leak Fix compile error when LSI_DEBUG is defined Fix build for mingw32 on windows ($$ expansion) Fix build for mingw32 on windows ($@ in macro) e1000: Fix warning from code review multiboot: Fix module loading and setting of mmap. Make -kernel for linux work with bochsbios Fix recently introduced bugs in -usbdevice host Fix description of size parameter in qemu-img's help text ... Conflicts: monitor.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'posix-aio-compat.c')
-rw-r--r--posix-aio-compat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index 1589ef2c9..272e99832 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -118,7 +118,7 @@ static void thread_create(pthread_t *thread, pthread_attr_t *attr,
if (ret) die2(ret, "pthread_create");
}
-static size_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb)
+static ssize_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb)
{
int ret;
@@ -137,7 +137,7 @@ static size_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb)
return aiocb->aio_nbytes;
}
-static size_t handle_aiocb_flush(struct qemu_paiocb *aiocb)
+static ssize_t handle_aiocb_flush(struct qemu_paiocb *aiocb)
{
int ret;
@@ -177,7 +177,7 @@ qemu_pwritev(int fd, const struct iovec *iov, int nr_iov, off_t offset)
#endif
-static size_t handle_aiocb_rw_vector(struct qemu_paiocb *aiocb)
+static ssize_t handle_aiocb_rw_vector(struct qemu_paiocb *aiocb)
{
size_t offset = 0;
ssize_t len;
@@ -200,10 +200,10 @@ static size_t handle_aiocb_rw_vector(struct qemu_paiocb *aiocb)
return len;
}
-static size_t handle_aiocb_rw_linear(struct qemu_paiocb *aiocb, char *buf)
+static ssize_t handle_aiocb_rw_linear(struct qemu_paiocb *aiocb, char *buf)
{
- size_t offset = 0;
- size_t len;
+ ssize_t offset = 0;
+ ssize_t len;
while (offset < aiocb->aio_nbytes) {
if (aiocb->aio_type & QEMU_AIO_WRITE)
@@ -231,9 +231,9 @@ static size_t handle_aiocb_rw_linear(struct qemu_paiocb *aiocb, char *buf)
return offset;
}
-static size_t handle_aiocb_rw(struct qemu_paiocb *aiocb)
+static ssize_t handle_aiocb_rw(struct qemu_paiocb *aiocb)
{
- size_t nbytes;
+ ssize_t nbytes;
char *buf;
if (!(aiocb->aio_type & QEMU_AIO_MISALIGNED)) {
@@ -309,7 +309,7 @@ static void *aio_thread(void *unused)
while (1) {
struct qemu_paiocb *aiocb;
- size_t ret = 0;
+ ssize_t ret = 0;
qemu_timeval tv;
struct timespec ts;