aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-09-06 13:14:54 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2018-10-05 16:27:09 +0400
commitbb15cbc0538f4a81810761c58d9b4acf0917b60d (patch)
treeaa350bf28da6f5d6cafbe9c7f7de5eedb57388c7 /vl.c
parente569ba9232ce91bc4ffaa566b2ac44e49d8f5ba2 (diff)
vl: handle -object help
List the user creatable objects. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index a867c9c4d9..f254b99bdb 100644
--- a/vl.c
+++ b/vl.c
@@ -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;