Skip to content

Commit

Permalink
machine: Clean up -machine handling
Browse files Browse the repository at this point in the history
Since commit c4090f8, -object options are no longer handled through
object_set_property(), so clean up -object leftovers by renaming the
function and dropping special-casing of qom-type and id properties.

Cc: Paolo Bonzini <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
  • Loading branch information
afaerber committed Sep 4, 2014
1 parent 8af734c commit d2659e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2841,15 +2841,15 @@ static void free_and_trace(gpointer mem)
free(mem);
}

static int object_set_property(const char *name, const char *value, void *opaque)
static int machine_set_property(const char *name, const char *value,
void *opaque)
{
Object *obj = OBJECT(opaque);
StringInputVisitor *siv;
Error *local_err = NULL;
char *c, *qom_name;

if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0 ||
strcmp(name, "type") == 0) {
if (strcmp(name, "type") == 0) {
return 0;
}

Expand Down Expand Up @@ -4254,7 +4254,7 @@ int main(int argc, char **argv, char **envp)
}

machine_opts = qemu_get_machine_opts();
if (qemu_opt_foreach(machine_opts, object_set_property, current_machine,
if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
1) < 0) {
object_unref(OBJECT(current_machine));
exit(1);
Expand Down

0 comments on commit d2659e2

Please sign in to comment.