* [Qemu-devel] [PULL 0/4] QMP queue
@ 2015-02-23 16:55 Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 1/4] hmp: Fix warning from smatch (wrong argument in function call) Luiz Capitulino
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Luiz Capitulino @ 2015-02-23 16:55 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel
The following changes since commit cd2d5541271f1934345d8ca42f5fafff1744eee7:
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150212' into staging (2015-02-13 11:44:50 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
for you to fetch changes up to 912ae9c88669d0a0cbae1f20b8c80dde8e526251:
qapi-types: add C99 index names to arrays (2015-02-23 11:00:05 -0500)
----------------------------------------------------------------
Eric Blake (1):
balloon: Fix typo
Gonglei (1):
monitor: Fix missing err = NULL in client_migrate_info()
Michael S. Tsirkin (1):
qapi-types: add C99 index names to arrays
Stefan Weil (1):
hmp: Fix warning from smatch (wrong argument in function call)
balloon.c | 6 +++---
hmp.c | 2 +-
monitor.c | 3 ++-
scripts/qapi-types.py | 11 +++++++----
4 files changed, 13 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 1/4] hmp: Fix warning from smatch (wrong argument in function call)
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
@ 2015-02-23 16:55 ` Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 2/4] balloon: Fix typo Luiz Capitulino
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2015-02-23 16:55 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel
From: Stefan Weil <sw@weilnetz.de>
Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer
qmp_query_block expects a pointer argument, so passing false is wrong.
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
hmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hmp.c b/hmp.c
index b47f331..7690323 100644
--- a/hmp.c
+++ b/hmp.c
@@ -411,7 +411,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;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 2/4] balloon: Fix typo
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 1/4] hmp: Fix warning from smatch (wrong argument in function call) Luiz Capitulino
@ 2015-02-23 16:55 ` Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 3/4] monitor: Fix missing err = NULL in client_migrate_info() Luiz Capitulino
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2015-02-23 16:55 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel
From: Eric Blake <eblake@redhat.com>
Commit 422e0501 introduced a typo (unless removing an 'o' from
balloon is how you deflate it?)
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
balloon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/balloon.c b/balloon.c
index dea19a4..70c00f5 100644
--- a/balloon.c
+++ b/balloon.c
@@ -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;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 3/4] monitor: Fix missing err = NULL in client_migrate_info()
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 1/4] hmp: Fix warning from smatch (wrong argument in function call) Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 2/4] balloon: Fix typo Luiz Capitulino
@ 2015-02-23 16:55 ` Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 4/4] qapi-types: add C99 index names to arrays Luiz Capitulino
2015-02-26 13:08 ` [Qemu-devel] [PULL 0/4] QMP queue Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2015-02-23 16:55 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel
From: Gonglei <arei.gonglei@huawei.com>
When SPICE isn't used, we either fail an assertion in error_set(),
or leak an error object. Broken in commit b25d81b.
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index c3cc060..137d23f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1095,12 +1095,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;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 4/4] qapi-types: add C99 index names to arrays
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
` (2 preceding siblings ...)
2015-02-23 16:55 ` [Qemu-devel] [PULL 3/4] monitor: Fix missing err = NULL in client_migrate_info() Luiz Capitulino
@ 2015-02-23 16:55 ` Luiz Capitulino
2015-02-26 13:08 ` [Qemu-devel] [PULL 0/4] QMP queue Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2015-02-23 16:55 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel
From: "Michael S. Tsirkin" <mst@redhat.com>
It's not easy to figure out how monitor translates
strings: most QEMU code deals with translated indexes,
these are translated using _lookup arrays,
so you need to find the array name, and find the
appropriate offset.
This patch adds C99 indexes to lookup arrays, which makes it possible to
find the correct key using simple grep, and see that the matching is
correct at a glance.
Example:
Before:
const char *MigrationCapability_lookup[] = {
"xbzrle",
"rdma-pin-all",
"auto-converge",
"zero-blocks",
NULL,
};
After:
const char *MigrationCapability_lookup[] = {
[MIGRATION_CAPABILITY_XBZRLE] = "xbzrle",
[MIGRATION_CAPABILITY_RDMA_PIN_ALL] = "rdma-pin-all",
[MIGRATION_CAPABILITY_AUTO_CONVERGE] = "auto-converge",
[MIGRATION_CAPABILITY_ZERO_BLOCKS] = "zero-blocks",
[MIGRATION_CAPABILITY_MAX] = NULL,
};
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
scripts/qapi-types.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index 1eb272d..db87218 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -123,16 +123,19 @@ const char *%(name)s_lookup[] = {
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):
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] QMP queue
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
` (3 preceding siblings ...)
2015-02-23 16:55 ` [Qemu-devel] [PULL 4/4] qapi-types: add C99 index names to arrays Luiz Capitulino
@ 2015-02-26 13:08 ` Peter Maydell
4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2015-02-26 13:08 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: QEMU Developers
On 24 February 2015 at 01:55, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> The following changes since commit cd2d5541271f1934345d8ca42f5fafff1744eee7:
>
> Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150212' into staging (2015-02-13 11:44:50 +0000)
>
> are available in the git repository at:
>
>
> git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
>
> for you to fetch changes up to 912ae9c88669d0a0cbae1f20b8c80dde8e526251:
>
> qapi-types: add C99 index names to arrays (2015-02-23 11:00:05 -0500)
>
> ----------------------------------------------------------------
> Eric Blake (1):
> balloon: Fix typo
>
> Gonglei (1):
> monitor: Fix missing err = NULL in client_migrate_info()
>
> Michael S. Tsirkin (1):
> qapi-types: add C99 index names to arrays
>
> Stefan Weil (1):
> hmp: Fix warning from smatch (wrong argument in function call)
>
> balloon.c | 6 +++---
> hmp.c | 2 +-
> monitor.c | 3 ++-
> scripts/qapi-types.py | 11 +++++++----
> 4 files changed, 13 insertions(+), 9 deletions(-)
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-26 13:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 16:55 [Qemu-devel] [PULL 0/4] QMP queue Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 1/4] hmp: Fix warning from smatch (wrong argument in function call) Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 2/4] balloon: Fix typo Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 3/4] monitor: Fix missing err = NULL in client_migrate_info() Luiz Capitulino
2015-02-23 16:55 ` [Qemu-devel] [PULL 4/4] qapi-types: add C99 index names to arrays Luiz Capitulino
2015-02-26 13:08 ` [Qemu-devel] [PULL 0/4] QMP queue Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).