Re: [RFC PATCH 03/22] qapi: Rename BlockExport to BlockExportOptions

2020-08-19 Thread Eric Blake

On 8/13/20 11:29 AM, Kevin Wolf wrote:

The name BlockExport will be used for the struct containing the runtime
state of block exports, so change the name of export creation options.

Signed-off-by: Kevin Wolf 
---
  qapi/block-export.json | 12 ++--
  block/monitor/block-hmp-cmds.c |  6 +++---
  blockdev-nbd.c |  2 +-
  qemu-storage-daemon.c  |  8 
  4 files changed, 14 insertions(+), 14 deletions(-)


Mechanical, and doesn't impact introspection.

Reviewed-by: Eric Blake 

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




Re: [RFC PATCH 03/22] qapi: Rename BlockExport to BlockExportOptions

2020-08-17 Thread Max Reitz
On 13.08.20 18:29, Kevin Wolf wrote:
> The name BlockExport will be used for the struct containing the runtime
> state of block exports, so change the name of export creation options.
> 
> Signed-off-by: Kevin Wolf 
> ---
>  qapi/block-export.json | 12 ++--
>  block/monitor/block-hmp-cmds.c |  6 +++---
>  blockdev-nbd.c |  2 +-
>  qemu-storage-daemon.c  |  8 
>  4 files changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Max Reitz 



signature.asc
Description: OpenPGP digital signature


[RFC PATCH 03/22] qapi: Rename BlockExport to BlockExportOptions

2020-08-13 Thread Kevin Wolf
The name BlockExport will be used for the struct containing the runtime
state of block exports, so change the name of export creation options.

Signed-off-by: Kevin Wolf 
---
 qapi/block-export.json | 12 ++--
 block/monitor/block-hmp-cmds.c |  6 +++---
 blockdev-nbd.c |  2 +-
 qemu-storage-daemon.c  |  8 
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/qapi/block-export.json b/qapi/block-export.json
index 62f4938e83..9332076a05 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -54,7 +54,7 @@
 '*tls-authz': 'str'} }
 
 ##
-# @BlockExportNbd:
+# @BlockExportOptionsNbd:
 #
 # An NBD block export.
 #
@@ -75,7 +75,7 @@
 #
 # Since: 5.0
 ##
-{ 'struct': 'BlockExportNbd',
+{ 'struct': 'BlockExportOptionsNbd',
   'data': {'device': 'str', '*name': 'str', '*description': 'str',
'*writable': 'bool', '*bitmap': 'str' } }
 
@@ -90,7 +90,7 @@
 # Since: 1.3.0
 ##
 { 'command': 'nbd-server-add',
-  'data': 'BlockExportNbd', 'boxed': true }
+  'data': 'BlockExportOptionsNbd', 'boxed': true }
 
 ##
 # @NbdServerRemoveMode:
@@ -156,17 +156,17 @@
   'data': [ 'nbd' ] }
 
 ##
-# @BlockExport:
+# @BlockExportOptions:
 #
 # Describes a block export, i.e. how single node should be exported on an
 # external interface.
 #
 # Since: 4.2
 ##
-{ 'union': 'BlockExport',
+{ 'union': 'BlockExportOptions',
   'base': { 'type': 'BlockExportType' },
   'discriminator': 'type',
   'data': {
-  'nbd': 'BlockExportNbd'
+  'nbd': 'BlockExportOptionsNbd'
} }
 
diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
index fb9d87ee89..56bc83ac97 100644
--- a/block/monitor/block-hmp-cmds.c
+++ b/block/monitor/block-hmp-cmds.c
@@ -398,7 +398,7 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict)
 Error *local_err = NULL;
 BlockInfoList *block_list, *info;
 SocketAddress *addr;
-BlockExportNbd export;
+BlockExportOptionsNbd export;
 
 if (writable && !all) {
 error_setg(_err, "-w only valid together with -a");
@@ -431,7 +431,7 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict)
 continue;
 }
 
-export = (BlockExportNbd) {
+export = (BlockExportOptionsNbd) {
 .device = info->value->device,
 .has_writable   = true,
 .writable   = writable,
@@ -458,7 +458,7 @@ void hmp_nbd_server_add(Monitor *mon, const QDict *qdict)
 bool writable = qdict_get_try_bool(qdict, "writable", false);
 Error *local_err = NULL;
 
-BlockExportNbd export = {
+BlockExportOptionsNbd export = {
 .device = (char *) device,
 .has_name   = !!name,
 .name   = (char *) name,
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index 0f6b80c58f..98ee1b6170 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -148,7 +148,7 @@ void qmp_nbd_server_start(SocketAddressLegacy *addr,
 qapi_free_SocketAddress(addr_flat);
 }
 
-void qmp_nbd_server_add(BlockExportNbd *arg, Error **errp)
+void qmp_nbd_server_add(BlockExportOptionsNbd *arg, Error **errp)
 {
 BlockDriverState *bs = NULL;
 BlockBackend *on_eject_blk;
diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c
index ed9d2afcf3..ed26097254 100644
--- a/qemu-storage-daemon.c
+++ b/qemu-storage-daemon.c
@@ -150,7 +150,7 @@ static void init_qmp_commands(void)
  qmp_marshal_qmp_capabilities, QCO_ALLOW_PRECONFIG);
 }
 
-static void init_export(BlockExport *export, Error **errp)
+static void init_export(BlockExportOptions *export, Error **errp)
 {
 switch (export->type) {
 case BLOCK_EXPORT_TYPE_NBD:
@@ -235,14 +235,14 @@ static void process_options(int argc, char *argv[])
 case OPTION_EXPORT:
 {
 Visitor *v;
-BlockExport *export;
+BlockExportOptions *export;
 
 v = qobject_input_visitor_new_str(optarg, "type", 
_fatal);
-visit_type_BlockExport(v, NULL, , _fatal);
+visit_type_BlockExportOptions(v, NULL, , _fatal);
 visit_free(v);
 
 init_export(export, _fatal);
-qapi_free_BlockExport(export);
+qapi_free_BlockExportOptions(export);
 break;
 }
 case OPTION_MONITOR:
-- 
2.25.4