[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/3] migration: stop returning errno from load_snapshot()
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 3/3] migration: stop returning errno from load_snapshot() |
Date: |
Wed, 21 Oct 2020 11:12:03 +0100 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
On Mon, Oct 12, 2020 at 02:27:43PM +0200, Philippe Mathieu-Daudé wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
>
> None of the callers care about the errno value since there is a full
> Error object populated. This gives consistency with save_snapshot()
> which already just returns a boolean value.
>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> [PMD: Return false/true instead of -1/0, document function]
> Acked-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> include/migration/snapshot.h | 9 ++++++++-
> migration/savevm.c | 19 +++++++++----------
> monitor/hmp-cmds.c | 2 +-
> replay/replay-snapshot.c | 2 +-
> softmmu/vl.c | 2 +-
> 5 files changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/include/migration/snapshot.h b/include/migration/snapshot.h
> index a40c34307b5..9bc989a6b49 100644
> --- a/include/migration/snapshot.h
> +++ b/include/migration/snapshot.h
> @@ -23,6 +23,13 @@
> * On failure, store an error through @errp and return %false.
> */
> bool save_snapshot(const char *name, Error **errp);
> -int load_snapshot(const char *name, Error **errp);
> +/**
> + * save_snapshot: Load a snapshot.
s/save/load/
> + * @name: path to snapshot
Again, a name not a path. I'll apply this
- * save_snapshot: Load a snapshot.
- * @name: path to snapshot
+ * load_snapshot: Load an internal snapshot.
+ * @name: name of internal snapshot
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|