]> Git Repo - qemu.git/commitdiff
vl: handle -object help
authorMarc-André Lureau <[email protected]>
Thu, 6 Sep 2018 09:14:54 +0000 (13:14 +0400)
committerMarc-André Lureau <[email protected]>
Fri, 5 Oct 2018 12:27:09 +0000 (16:27 +0400)
List the user creatable objects.

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
vl.c

diff --git a/vl.c b/vl.c
index a867c9c4d9eb4b119fca8fc3ae47a0d49728f1d8..f254b99bdb7d83fc9dd834b1bcac4497f6661a45 100644 (file)
--- 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;
This page took 0.029843 seconds and 4 git commands to generate.