summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-11-06 10:24:00 -0200
committerMarcelo Tosatti <mtosatti@redhat.com>2009-11-06 10:24:00 -0200
commit947007cb3791e78b5f15225c60db8b2bcccd25e7 (patch)
tree345d24853424698722c66d2d3258e1f7f2bb6223 /posix-aio-compat.c
parentMerge commit '5245d57a7ac830fc015465981db729646a768993' into upstream-merge (diff)
parentRemove aio_ctx from paio_* interface (diff)
downloadqemu-kvm-947007cb3791e78b5f15225c60db8b2bcccd25e7.tar.gz
qemu-kvm-947007cb3791e78b5f15225c60db8b2bcccd25e7.tar.bz2
qemu-kvm-947007cb3791e78b5f15225c60db8b2bcccd25e7.zip
Merge commit '1e5b9d2fccb205ed8fc84fb38945b8fb3d225640' into upstream-merge
* commit '1e5b9d2fccb205ed8fc84fb38945b8fb3d225640': Remove aio_ctx from paio_* interface Add *CFLAGS to LINK in rules.mak serial: Add missing bit serial: Support additional serial speed values usb: print attached status in info qtree usb-host: use qdev for -usbdevice + rework. usb-storage: use qdev for -usbdevice usb: make attach optional. usb-serial and braille: use qdev for -usbdevice usb-hid: use qdev for -usbdevice usb core: use qdev for -usbdevice use rom loader for pc bios. Conflicts: posix-aio-compat.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'posix-aio-compat.c')
-rw-r--r--posix-aio-compat.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index d7dbab3e4..1589ef2c9 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -557,7 +557,7 @@ static AIOPool raw_aio_pool = {
.cancel = paio_cancel,
};
-BlockDriverAIOCB *paio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
+BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type)
{
@@ -608,14 +608,14 @@ BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
return &acb->common;
}
-void *paio_init(void)
+int paio_init(void)
{
sigset_t mask;
PosixAioState *s;
int ret;
if (posix_aio_state)
- return posix_aio_state;
+ return 0;
s = qemu_malloc(sizeof(PosixAioState));
@@ -628,7 +628,7 @@ void *paio_init(void)
s->fd = qemu_signalfd(&mask);
if (s->fd == -1) {
fprintf(stderr, "failed to create signalfd\n");
- return NULL;
+ return -1;
}
fcntl(s->fd, F_SETFL, O_NONBLOCK);
@@ -647,6 +647,5 @@ void *paio_init(void)
QTAILQ_INIT(&request_list);
posix_aio_state = s;
-
- return posix_aio_state;
+ return 0;
}