提交 c72e7688 编写于 作者: M Michal Novotny 提交者: Luiz Capitulino

New cpu-max field in query-machines QMP command output

Alter the query-machines QMP command to output information about
maximum number of CPUs for each machine type with default value
set to 1 in case the number of max_cpus is not set.
Signed-off-by: NMichal Novotny <minovotn@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 93b48c20
......@@ -2861,11 +2861,14 @@
#
# @default: #optional whether the machine is default
#
# @cpu-max: maximum number of CPUs supported by the machine type
# (since 1.5.0)
#
# Since: 1.2.0
##
{ 'type': 'MachineInfo',
'data': { 'name': 'str', '*alias': 'str',
'*is-default': 'bool' } }
'*is-default': 'bool', 'cpu-max': 'int' } }
##
# @query-machines:
......
......@@ -1617,6 +1617,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
}
info->name = g_strdup(m->name);
info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
entry = g_malloc0(sizeof(*entry));
entry->value = info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册