[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 02/10] migration: stop returning errno from load_snapshot(

From: Eric Blake
Subject: Re: [PATCH v6 02/10] migration: stop returning errno from load_snapshot()
Date: Mon, 19 Oct 2020 16:15:08 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/8/20 10:49 AM, Daniel P. Berrangé wrote:
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 -1.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
  migration/savevm.c | 15 +++++++--------
  1 file changed, 7 insertions(+), 8 deletions(-)

@@ -2892,11 +2892,11 @@ int load_snapshot(const char *name, Error **errp)
      ret = bdrv_snapshot_find(bs_vm_state, &sn, name);
      if (ret < 0) {
-        return ret;
+        return -1;
      } else if (sn.vm_state_size == 0) {
          error_setg(errp, "This is a disk-only snapshot. Revert to it "
                     " offline using qemu-img");

While you are here, let's fix the double space in the error message.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]