[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 05/22] qemu-storage-daemon: Use qmp_block_export_add()
From: |
Kevin Wolf |
Subject: |
[RFC PATCH 05/22] qemu-storage-daemon: Use qmp_block_export_add() |
Date: |
Thu, 13 Aug 2020 18:29:18 +0200 |
No reason to duplicate the functionality locally, we can now just reuse
the QMP command block-export-add for --export.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qemu-storage-daemon.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c
index ed26097254..b6f678d3ab 100644
--- a/qemu-storage-daemon.c
+++ b/qemu-storage-daemon.c
@@ -150,17 +150,6 @@ static void init_qmp_commands(void)
qmp_marshal_qmp_capabilities, QCO_ALLOW_PRECONFIG);
}
-static void init_export(BlockExportOptions *export, Error **errp)
-{
- switch (export->type) {
- case BLOCK_EXPORT_TYPE_NBD:
- qmp_nbd_server_add(&export->u.nbd, errp);
- break;
- default:
- g_assert_not_reached();
- }
-}
-
static void process_options(int argc, char *argv[])
{
int c;
@@ -241,7 +230,7 @@ static void process_options(int argc, char *argv[])
visit_type_BlockExportOptions(v, NULL, &export, &error_fatal);
visit_free(v);
- init_export(export, &error_fatal);
+ qmp_block_export_add(export, &error_fatal);
qapi_free_BlockExportOptions(export);
break;
}
--
2.25.4
- [RFC PATCH 03/22] qapi: Rename BlockExport to BlockExportOptions, (continued)
Re: [RFC PATCH 04/22] block/export: Add BlockExport infrastructure and block-export-add, Eric Blake, 2020/08/19
[RFC PATCH 05/22] qemu-storage-daemon: Use qmp_block_export_add(),
Kevin Wolf <=
[RFC PATCH 06/22] qemu-nbd: Use raw block driver for --offset, Kevin Wolf, 2020/08/13
Re: [RFC PATCH 06/22] qemu-nbd: Use raw block driver for --offset, Eric Blake, 2020/08/19
[RFC PATCH 07/22] block/export: Remove magic from block-export-add, Kevin Wolf, 2020/08/13