First pass, concentrating on interfaces, implementation mostly ignored. Dietmar Maurer <diet...@proxmox.com> writes:
> Signed-off-by: Dietmar Maurer <diet...@proxmox.com> > --- > blockdev.c | 196 > +++++++++++++++++++++++++++++++++++++++++++++++++++++- > hmp.c | 3 +- > qapi-schema.json | 5 +- > 3 files changed, 200 insertions(+), 4 deletions(-) > [...] > diff --git a/hmp.c b/hmp.c > index b2c1f23..370cdf8 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -1052,7 +1052,8 @@ void hmp_backup(Monitor *mon, const QDict *qdict) > Error *errp = NULL; > > qmp_backup(backup_file, true, BACKUP_FORMAT_VMA, false, NULL, !!devlist, > - devlist, qdict_haskey(qdict, "speed"), speed, &errp); > + devlist, qdict_haskey(qdict, "speed"), speed, false, false, > + &errp); > > if (error_is_set(&errp)) { > monitor_printf(mon, "%s\n", error_get_pretty(errp)); Feature not available in HMP. You could add a flag argument to provide it. > diff --git a/qapi-schema.json b/qapi-schema.json > index 09ca8ef..1fabb67 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -1885,6 +1885,8 @@ > # @devlist: #optional list of block device names (separated by ',', ';' > # or ':'). By default the backup includes all writable block devices. > # > +# @state: #optional flag to include vm state > +# This isn't a state. Suggest to call it @save_vmstate or similar. > # Returns: the uuid of the backup job > # > # Since: 1.5.0 > @@ -1892,7 +1894,8 @@ > { 'command': 'backup', 'data': { 'backup-file': 'str', > '*format': 'BackupFormat', > '*config-file': 'str', > - '*devlist': 'str', '*speed': 'int' }, > + '*devlist': 'str', '*speed': 'int', > + '*state': 'bool' }, > 'returns': 'str' } > > ##