Revision 1e5b9d2f posix-aio-compat.c

b/posix-aio-compat.c
556 556
    .cancel             = paio_cancel,
557 557
};
558 558

  
559
BlockDriverAIOCB *paio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
559
BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,
560 560
        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
561 561
        BlockDriverCompletionFunc *cb, void *opaque, int type)
562 562
{
......
607 607
    return &acb->common;
608 608
}
609 609

  
610
void *paio_init(void)
610
int paio_init(void)
611 611
{
612 612
    struct sigaction act;
613 613
    PosixAioState *s;
......
615 615
    int ret;
616 616

  
617 617
    if (posix_aio_state)
618
        return posix_aio_state;
618
        return 0;
619 619

  
620 620
    s = qemu_malloc(sizeof(PosixAioState));
621 621

  
......
627 627
    s->first_aio = NULL;
628 628
    if (pipe(fds) == -1) {
629 629
        fprintf(stderr, "failed to create pipe\n");
630
        return NULL;
630
        return -1;
631 631
    }
632 632

  
633 633
    s->rfd = fds[0];
......
650 650
    QTAILQ_INIT(&request_list);
651 651

  
652 652
    posix_aio_state = s;
653

  
654
    return posix_aio_state;
653
    return 0;
655 654
}

Also available in: Unified diff