Juan Quintela <quint...@redhat.com> writes:

> Fabiano Rosas <faro...@suse.de> wrote:
>> From: Nikolay Borisov <nbori...@suse.com>
>>
>> Make the migration json writer part of MigrationState struct, allowing
>> the 'configuration' object be serialized to json.
>>
>> This will facilitate the parsing of the 'configuration' object in the
>> next patch that fixes analyze-migration.py for arm.
>>
>> Signed-off-by: Nikolay Borisov <nbori...@suse.com>
>> Signed-off-by: Fabiano Rosas <faro...@suse.de>
>
> Reviewed-by: Juan Quintela <quint...@redhat.com>
>
> queued.
>
>>          qemu_put_byte(f, QEMU_VM_CONFIGURATION);
>> -        vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0);
>> +
>> +        /*
>> +         * This starts the main json object and is paired with the
>> +         * json_writer_end_object in
>> +         * qemu_savevm_state_complete_precopy_non_iterable
>> +         */
>> +        json_writer_start_object(s->vmdesc, NULL);
>
> This don't depend of this patch, but it is ugly as hell.
>
> Can we create:
>
> json_write_start_main_object(s->vmdesc);
>
> (equivalent for end)
>
> And forbid json_writer_start_object() for taking a NULL parameter?
>
> Later, Juan.

Yep, I'll look into it.

Reply via email to