提交 bb15cbc0 编写于 作者: M Marc-André Lureau

vl: handle -object help

List the user creatable objects.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 e569ba92
......@@ -2698,6 +2698,19 @@ static int machine_set_property(void *opaque,
*/
static bool object_create_initial(const char *type)
{
if (is_help_option(type)) {
GSList *l, *list;
printf("List of user creatable objects:\n");
list = object_class_get_list_sorted(TYPE_USER_CREATABLE, false);
for (l = list; l != NULL; l = l->next) {
ObjectClass *oc = OBJECT_CLASS(l->data);
printf("%s\n", object_class_get_name(oc));
}
g_slist_free(list);
exit(0);
}
if (g_str_equal(type, "rng-egd") ||
g_str_has_prefix(type, "pr-manager-")) {
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册