monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
commite1ff3c67e8544f41f1bea76ba76385faee0d2bb7
authorIgor Mammedov <imammedo@redhat.com>
Tue, 10 Jan 2017 12:53:15 +0000 (10 13:53 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 12 Jan 2017 17:35:06 +0000 (12 15:35 -0200)
tree098cc8b6629e0185d4b11706d44211296f0f5f23
parent3a4641054e320d8ad7e780c30010b1c1dbfc56e8
monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends

Considering 'id' is mandatory for user_creatable objects/backends
and user_creatable_add_type() always has it as an argument
regardless of where from it is called CLI/monitor or QMP,
Fix issue by adding 'id' property to hostmem backends and
set it in user_creatable_add_type() for every object that
implements 'id' property. Then later at query-memdev time
get 'id' from object directly.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1484052795-158195-4-git-send-email-imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
backends/hostmem.c
docs/qmp-commands.txt
hmp.c
include/sysemu/hostmem.h
numa.c
qapi-schema.json
qom/object_interfaces.c