mirror of
https://github.com/qemu/qemu.git
synced 2026-05-21 07:37:14 +00:00
qapi/block-core: use JobType for BlockJobInfo's type
In preparation to turn BlockJobInfo into a union with @type as the discriminator. That requires it to be an enum. Even without that requirement, it's nicer to have an enum instead of a str here. No functional change is intended. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20231031135431.393137-7-f.ebner@proxmox.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -846,7 +846,7 @@ void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
|
||||
}
|
||||
|
||||
while (list) {
|
||||
if (strcmp(list->value->type, "stream") == 0) {
|
||||
if (list->value->type == JOB_TYPE_STREAM) {
|
||||
monitor_printf(mon, "Streaming device %s: Completed %" PRId64
|
||||
" of %" PRId64 " bytes, speed limit %" PRId64
|
||||
" bytes/s\n",
|
||||
@@ -858,7 +858,7 @@ void hmp_info_block_jobs(Monitor *mon, const QDict *qdict)
|
||||
monitor_printf(mon, "Type %s, device %s: Completed %" PRId64
|
||||
" of %" PRId64 " bytes, speed limit %" PRId64
|
||||
" bytes/s\n",
|
||||
list->value->type,
|
||||
JobType_str(list->value->type),
|
||||
list->value->device,
|
||||
list->value->offset,
|
||||
list->value->len,
|
||||
|
||||
Reference in New Issue
Block a user