OSDN Git Service

qom: Factor out user_creatable_process_cmdline()
authorKevin Wolf <kwolf@redhat.com>
Wed, 17 Feb 2021 11:06:20 +0000 (12:06 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 19 Mar 2021 09:17:14 +0000 (10:17 +0100)
commitf375026606f4ae1486189cb758cd0dfa60b3c18f
tree8d37e6cbc10043a5a252c3cbf7257f18e8bcb680
parentc9231123907415d7737263b9ca6f125a8181463b
qom: Factor out user_creatable_process_cmdline()

The implementation for --object can be shared between
qemu-storage-daemon and other binaries, so move it into a function in
qom/object_interfaces.c that is accessible from everywhere.

This also requires moving the implementation of qmp_object_add() into a
new user_creatable_add_qapi(), because qom/qom-qmp-cmds.c is not linked
for tools.

user_creatable_print_help_from_qdict() can become static now.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
include/qom/object_interfaces.h
qom/object_interfaces.c
qom/qom-qmp-cmds.c
storage-daemon/qemu-storage-daemon.c