object: add more commands to preconfig mode
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 Nov 2020 09:39:02 +0000 (04:39 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 May 2021 12:49:45 +0000 (14:49 +0200)
Creating and destroying QOM objects does not require a fully constructed
machine.  Allow running object-add and object-del before machine
initialization has concluded.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hmp-commands.hx
qapi/qom.json

index 435c591a1cc1677a0e560d5ad59cb7ce9760d2aa..146a13c89665f7d6b57031d02a37a33a5d652c06 100644 (file)
@@ -1297,6 +1297,7 @@ ERST
         .help       = "create QOM object",
         .cmd        = hmp_object_add,
         .command_completion = object_add_completion,
+        .flags      = "p",
     },
 
 SRST
@@ -1311,6 +1312,7 @@ ERST
         .help       = "destroy QOM object",
         .cmd        = hmp_object_del,
         .command_completion = object_del_completion,
+        .flags      = "p",
     },
 
 SRST
index 40d70c434a09f5edf2f1bab38ed7cb1d72ff6e32..4f48035831a4200ee7081ee466b218e85fdebb8a 100644 (file)
 # <- { "return": {} }
 #
 ##
-{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true }
+{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true,
+  'allow-preconfig': true }
 
 ##
 # @object-del:
 # <- { "return": {} }
 #
 ##
-{ 'command': 'object-del', 'data': {'id': 'str'} }
+{ 'command': 'object-del', 'data': {'id': 'str'},
+  'allow-preconfig': true }
This page took 0.032472 seconds and 4 git commands to generate.