]> git.proxmox.com Git - qemu.git/blobdiff - linux-aio.c
omap1: convert to memory API (part VI)
[qemu.git] / linux-aio.c
index dc3faf24995a673c802ea754a28b73c26d69134c..5265a029b2bbd39c286fd3add46c845dfbbc4ebd 100644 (file)
@@ -181,6 +181,7 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
     case QEMU_AIO_READ:
         io_prep_preadv(iocbs, fd, qiov->iov, qiov->niov, offset);
        break;
+    /* Currently Linux kernel does not support other operations */
     default:
         fprintf(stderr, "%s: invalid AIO request type 0x%x.\n",
                         __func__, type);
@@ -204,7 +205,7 @@ void *laio_init(void)
 {
     struct qemu_laio_state *s;
 
-    s = qemu_mallocz(sizeof(*s));
+    s = g_malloc0(sizeof(*s));
     s->efd = eventfd(0, 0);
     if (s->efd == -1)
         goto out_free_state;
@@ -221,6 +222,6 @@ void *laio_init(void)
 out_close_efd:
     close(s->efd);
 out_free_state:
-    qemu_free(s);
+    g_free(s);
     return NULL;
 }