migration: Make save_snapshot() return bool, not 0/-1

Just for consistency, following the example documented since
commit e3fe3988d7 ("error: Document Error API usage rules"),
return a boolean value indicating an error is set or not.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210204124834.774401-3-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2021-02-04 12:48:24 +00:00 committed by Dr. David Alan Gilbert
parent e26f98e209
commit 7ea14df230
4 changed files with 18 additions and 11 deletions

View file

@ -15,7 +15,14 @@
#ifndef QEMU_MIGRATION_SNAPSHOT_H
#define QEMU_MIGRATION_SNAPSHOT_H
int save_snapshot(const char *name, Error **errp);
/**
* save_snapshot: Save an internal snapshot.
* @name: name of internal snapshot
* @errp: pointer to error object
* On success, return %true.
* 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);
#endif