diff mbox series

[5/9] qapi/block-core: turn BlockJobInfo into a union

Message ID 20230224144825.466375-6-f.ebner@proxmox.com (mailing list archive)
State New, archived
Headers show
Series mirror: allow switching from background to active mode | expand

Commit Message

Fiona Ebner Feb. 24, 2023, 2:48 p.m. UTC
In preparation to additionally return job-type-specific information.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 qapi/block-core.json | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Vladimir Sementsov-Ogievskiy March 1, 2023, 4:28 p.m. UTC | #1
On 24.02.23 17:48, Fiona Ebner wrote:
> In preparation to additionally return job-type-specific information.
> 
> Signed-off-by: Fiona Ebner<f.ebner@proxmox.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
diff mbox series

Patch

diff --git a/qapi/block-core.json b/qapi/block-core.json
index c1ac6de238..adb43a4592 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1342,13 +1342,15 @@ 
 #
 # Since: 1.1
 ##
-{ 'struct': 'BlockJobInfo',
-  'data': {'type': 'JobType', 'device': 'str', 'len': 'int',
+{ 'union': 'BlockJobInfo',
+  'base': {'type': 'JobType', 'device': 'str', 'len': 'int',
            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
            'io-status': 'BlockDeviceIoStatus', 'ready': 'bool',
            'status': 'JobStatus',
            'auto-finalize': 'bool', 'auto-dismiss': 'bool',
-           '*error': 'str' } }
+           '*error': 'str' },
+  'discriminator': 'type',
+  'data': {} }
 
 ##
 # @query-block-jobs: