]> Git Repo - qemu.git/blobdiff - tests/test-crypto-block.c
pc-bios/s390-ccw: Move virtio-block related functions into a separate file
[qemu.git] / tests / test-crypto-block.c
index 1957a867431439011b81f2378a3e447f81615aee..bd7fe593e3975e0441bc5056482eed8bc9c21848 100644 (file)
@@ -190,8 +190,8 @@ static ssize_t test_block_read_func(QCryptoBlock *block,
                                     size_t offset,
                                     uint8_t *buf,
                                     size_t buflen,
-                                    Error **errp,
-                                    void *opaque)
+                                    void *opaque,
+                                    Error **errp)
 {
     Buffer *header = opaque;
 
@@ -205,8 +205,8 @@ static ssize_t test_block_read_func(QCryptoBlock *block,
 
 static ssize_t test_block_init_func(QCryptoBlock *block,
                                     size_t headerlen,
-                                    Error **errp,
-                                    void *opaque)
+                                    void *opaque,
+                                    Error **errp)
 {
     Buffer *header = opaque;
 
@@ -222,8 +222,8 @@ static ssize_t test_block_write_func(QCryptoBlock *block,
                                      size_t offset,
                                      const uint8_t *buf,
                                      size_t buflen,
-                                     Error **errp,
-                                     void *opaque)
+                                     void *opaque,
+                                     Error **errp)
 {
     Buffer *header = opaque;
 
@@ -281,7 +281,7 @@ static void test_block(gconstpointer opaque)
     memset(&header, 0, sizeof(header));
     buffer_init(&header, "header");
 
-    blk = qcrypto_block_create(data->create_opts,
+    blk = qcrypto_block_create(data->create_opts, NULL,
                                test_block_init_func,
                                test_block_write_func,
                                &header,
@@ -300,7 +300,7 @@ static void test_block(gconstpointer opaque)
     object_unparent(sec);
 
     /* Ensure we can't open without the secret */
-    blk = qcrypto_block_open(data->open_opts,
+    blk = qcrypto_block_open(data->open_opts, NULL,
                              test_block_read_func,
                              &header,
                              0,
@@ -308,7 +308,7 @@ static void test_block(gconstpointer opaque)
     g_assert(blk == NULL);
 
     /* Ensure we can't open without the secret, unless NO_IO */
-    blk = qcrypto_block_open(data->open_opts,
+    blk = qcrypto_block_open(data->open_opts, NULL,
                              test_block_read_func,
                              &header,
                              QCRYPTO_BLOCK_OPEN_NO_IO,
@@ -322,7 +322,7 @@ static void test_block(gconstpointer opaque)
 
     /* Now open for real with secret */
     sec = test_block_secret();
-    blk = qcrypto_block_open(data->open_opts,
+    blk = qcrypto_block_open(data->open_opts, NULL,
                              test_block_read_func,
                              &header,
                              0,
This page took 0.042793 seconds and 4 git commands to generate.