summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-02-04 13:48:24 +0100
committerDr. David Alan Gilbert2021-02-08 12:19:51 +0100
commit7ea14df230b98ffb33342f40cfffbdbb8ddd2b06 (patch)
tree9524b6a2258aa1cb2f76a1c4f4da0c0e63410a98 /include
parentblock: push error reporting into bdrv_all_*_snapshot functions (diff)
downloadqemu-7ea14df230b98ffb33342f40cfffbdbb8ddd2b06.tar.gz
qemu-7ea14df230b98ffb33342f40cfffbdbb8ddd2b06.tar.xz
qemu-7ea14df230b98ffb33342f40cfffbdbb8ddd2b06.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/migration/snapshot.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/migration/snapshot.h b/include/migration/snapshot.h
index c85b6ec75b..0eaf1ba0b1 100644
--- a/include/migration/snapshot.h
+++ b/include/migration/snapshot.h
@@ -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