From 7ea14df230b98ffb33342f40cfffbdbb8ddd2b06 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Thu, 4 Feb 2021 12:48:24 +0000 Subject: 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 Acked-by: Pavel Dovgalyuk Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210204124834.774401-3-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/migration/snapshot.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3-55-g7522