mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: qapi-types: add C99 index names to arrays monitor: Fix missing err = NULL in client_migrate_info() balloon: Fix typo hmp: Fix warning from smatch (wrong argument in function call) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
041ccc922e
|
@ -36,7 +36,7 @@ static QEMUBalloonEvent *balloon_event_fn;
|
|||
static QEMUBalloonStatus *balloon_stat_fn;
|
||||
static void *balloon_opaque;
|
||||
|
||||
static bool have_ballon(Error **errp)
|
||||
static bool have_balloon(Error **errp)
|
||||
{
|
||||
if (kvm_enabled() && !kvm_has_sync_mmu()) {
|
||||
error_set(errp, ERROR_CLASS_KVM_MISSING_CAP,
|
||||
|
@ -81,7 +81,7 @@ BalloonInfo *qmp_query_balloon(Error **errp)
|
|||
{
|
||||
BalloonInfo *info;
|
||||
|
||||
if (!have_ballon(errp)) {
|
||||
if (!have_balloon(errp)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ BalloonInfo *qmp_query_balloon(Error **errp)
|
|||
|
||||
void qmp_balloon(int64_t target, Error **errp)
|
||||
{
|
||||
if (!have_ballon(errp)) {
|
||||
if (!have_balloon(errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
2
hmp.c
2
hmp.c
|
@ -412,7 +412,7 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
|
|||
|
||||
/* Print BlockBackend information */
|
||||
if (!nodes) {
|
||||
block_list = qmp_query_block(false);
|
||||
block_list = qmp_query_block(NULL);
|
||||
} else {
|
||||
block_list = NULL;
|
||||
}
|
||||
|
|
|
@ -1094,12 +1094,13 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
|
|||
const char *subject = qdict_get_try_str(qdict, "cert-subject");
|
||||
int port = qdict_get_try_int(qdict, "port", -1);
|
||||
int tls_port = qdict_get_try_int(qdict, "tls-port", -1);
|
||||
Error *err;
|
||||
Error *err = NULL;
|
||||
int ret;
|
||||
|
||||
if (strcmp(protocol, "spice") == 0) {
|
||||
if (!qemu_using_spice(&err)) {
|
||||
qerror_report_err(err);
|
||||
error_free(err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,16 +123,19 @@ def generate_enum_lookup(name, values):
|
|||
name=name)
|
||||
i = 0
|
||||
for value in values:
|
||||
index = generate_enum_full_value(name, value)
|
||||
ret += mcgen('''
|
||||
"%(value)s",
|
||||
[%(index)s] = "%(value)s",
|
||||
''',
|
||||
value=value)
|
||||
index = index, value = value)
|
||||
|
||||
max_index = generate_enum_full_value(name, 'MAX')
|
||||
ret += mcgen('''
|
||||
NULL,
|
||||
[%(max_index)s] = NULL,
|
||||
};
|
||||
|
||||
''')
|
||||
''',
|
||||
max_index=max_index)
|
||||
return ret
|
||||
|
||||
def generate_enum(name, values):
|
||||
|
|
Loading…
Reference in a new issue