diff options
author | Kevin Wolf | 2019-10-11 19:20:12 +0200 |
---|---|---|
committer | Kevin Wolf | 2019-10-14 17:12:48 +0200 |
commit | 3e9297f3659701a72110f0f560b4cc22452972f1 (patch) | |
tree | 8efe5e822111ba96540ce56ca0ecb78078f2b25d /include/qom | |
parent | iotests/028: Fix for long $TEST_DIRs (diff) | |
download | qemu-3e9297f3659701a72110f0f560b4cc22452972f1.tar.gz qemu-3e9297f3659701a72110f0f560b4cc22452972f1.tar.xz qemu-3e9297f3659701a72110f0f560b4cc22452972f1.zip |
vl: Split off user_creatable_print_help()
Printing help for --object is something that we not only want in the
system emulator, but also in tools that support --object. Move it into a
separate function in qom/object_interfaces.c to make the code accessible
for tools.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/object_interfaces.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h index 682ba1d9b0..3e4e1d928b 100644 --- a/include/qom/object_interfaces.h +++ b/include/qom/object_interfaces.h @@ -133,6 +133,18 @@ int user_creatable_add_opts_foreach(void *opaque, QemuOpts *opts, Error **errp); /** + * user_creatable_print_help: + * @type: the QOM type to be added + * @opts: options to create + * + * Prints help if requested in @opts. + * + * Returns: true if @opts contained a help option and help was printed, false + * if no help option was found. + */ +bool user_creatable_print_help(const char *type, QemuOpts *opts); + +/** * user_creatable_del: * @id: the unique ID for the object * @errp: if an error occurs, a pointer to an area to store the error |