Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
qemu.29316
Convert-query-block-info_block-to-corout.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Convert-query-block-info_block-to-corout.patch of Package qemu.29316
From: Dario Faggioli <dfaggioli@suse.com> Date: Thu, 1 Jun 2023 16:28:24 +0200 Subject: Convert query-block/info_block to coroutine Git-commit: Not yet References: bsc#1211000 Signed-off-by: Lin Ma <lma@suse.com> Signed-off-by: Dario Faggioli <dfaggioli@suse.com> --- block/monitor/block-hmp-cmds.c | 2 +- block/qapi.c | 2 +- hmp-commands-info.hx | 1 + include/block/block-hmp-cmds.h | 2 +- qapi/block-core.json | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index 2ac4aedfff04228be376c05ff978..02c4f3df31e0085e9a8fb4a2e1b7 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -744,7 +744,7 @@ static void print_block_info(Monitor *mon, BlockInfo *info, } } -void hmp_info_block(Monitor *mon, const QDict *qdict) +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict) { BlockInfoList *block_list, *info; BlockDeviceInfoList *blockdev_list, *blockdev; diff --git a/block/qapi.c b/block/qapi.c index cf557e3aea7c620508efa0178024..50ea0504447b81990ed22ca47f92 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -582,7 +582,7 @@ static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs, return s; } -BlockInfoList *qmp_query_block(Error **errp) +BlockInfoList *coroutine_fn qmp_query_block(Error **errp) { BlockInfoList *head = NULL, **p_next = &head; BlockBackend *blk; diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 407a1da800cfc19376dc48e1941d..735fe4cd347e634868bcc3cb3cf4 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -65,6 +65,7 @@ ERST .help = "show info of one block device or all block devices " "(-n: show named nodes; -v: show details)", .cmd = hmp_info_block, + .coroutine = true, }, SRST diff --git a/include/block/block-hmp-cmds.h b/include/block/block-hmp-cmds.h index 3412e108ca226ee69578d29bc4c6..5ef977092e338e7dc8c3d6a5717a 100644 --- a/include/block/block-hmp-cmds.h +++ b/include/block/block-hmp-cmds.h @@ -46,7 +46,7 @@ void hmp_eject(Monitor *mon, const QDict *qdict); void hmp_qemu_io(Monitor *mon, const QDict *qdict); -void hmp_info_block(Monitor *mon, const QDict *qdict); +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict); void hmp_info_blockstats(Monitor *mon, const QDict *qdict); void hmp_info_block_jobs(Monitor *mon, const QDict *qdict); void hmp_info_snapshots(Monitor *mon, const QDict *qdict); diff --git a/qapi/block-core.json b/qapi/block-core.json index 1d3dd9cb48edd36aa238002ae7a8..a48adf43054950e2a29b6a09e50c 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -741,7 +741,7 @@ # } # ## -{ 'command': 'query-block', 'returns': ['BlockInfo'] } +{ 'command': 'query-block', 'returns': ['BlockInfo'], 'coroutine': true } ##
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor