From nobody Sat May 4 05:29:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554316504841451.8315904828304; Wed, 3 Apr 2019 11:35:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93AA430FE5D8; Wed, 3 Apr 2019 18:35:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 16DEF61082; Wed, 3 Apr 2019 18:35:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BEA673FB11; Wed, 3 Apr 2019 18:34:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x33IYxmn009554 for ; Wed, 3 Apr 2019 14:34:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22A766014E; Wed, 3 Apr 2019 18:34:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D3DB605CA for ; Wed, 3 Apr 2019 18:34:57 +0000 (UTC) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4967710C94 for ; Wed, 3 Apr 2019 18:34:56 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id y3so8734941pgk.12 for ; Wed, 03 Apr 2019 11:34:56 -0700 (PDT) Received: from localhost.localdomain ([5.193.1.33]) by smtp.googlemail.com with ESMTPSA id o76sm48270178pfa.156.2019.04.03.11.34.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 11:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9n6yWIK+vhQ/qSjiV0cW1bbD++ZFVbWTbnolpzKw8Wo=; b=J4t9aJj/LA+JrodasvoG23l5CcbUk/BYzcGkbuFf5BSf6TUAeOFu3wjFf0d2trOLSZ 9j91bP+YpODUEvkDwzzhYSIz6nWSPHU6puwpInPajZkmcjsvu5k72qQnIzFuiJzMNSS+ tghLs2REKzTJGx41qmQhmpAdMxR7O1FJ9Xp/7unb4yKASghSikosISQg7DHsscNAApox ywqL28gI8vyqL88DG4qgUw6Gi8uasvE2462sZPXNOZPTaglZNa4d/d/Sn3xVnk313nAJ kZ1i8YrqR0aC/unJV4y8sH43Lc7CbNgQ9zO0Kz3YukQkuqNC9dUGT9WDdPjG1z5uQjIA J5ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9n6yWIK+vhQ/qSjiV0cW1bbD++ZFVbWTbnolpzKw8Wo=; b=ph7IxosqnGszIg8I9UIps6OmHmlHvgliR30rf5uU6MRHgJeU0+j+qP2xpUYjqcmeU4 L+LSwVs3jpcK9lXtBaeP6o+qZOuOGxe2e8jpBLI/8I1+3LTKQNWmQPPUb0mS59FQiOrq rujya6XPvjJnykYsTHWcvdloBjWVLR9lAHuXC2ThPSPwRTNLO83ecYHHmFr9DS1xPkN3 E1AK5c6DIWOZaen6zZdsFRjHTwTqMm0HZoLqPkYmRl8hh+UWc9kp1PRUOA2rxKcvK6wl pYB4MhwKC0mJOU8SL90T18BxN5CR9PEQLFCa+KwXWQclVr1UmWg954BZEag88iXyq0HC yATA== X-Gm-Message-State: APjAAAVM5leYJKw6MuE15mwNRBiohbKuOtMYdgFWZRqCCauqfLUB40eY p/o/OZF8VlvOS618FEJ52QPS6e6b X-Google-Smtp-Source: APXvYqymplobZEADMVc7yXFtvlcVxajDqAUjQPa8+mg3gMfquGFn7aybJN17cqdN9hQKNerdydYBbw== X-Received: by 2002:a62:1d0d:: with SMTP id d13mr1029990pfd.96.1554316495522; Wed, 03 Apr 2019 11:34:55 -0700 (PDT) From: Syed Humaid To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 22:34:32 +0400 Message-Id: <20190403183432.601-1-syedhumaidbinharoon@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 03 Apr 2019 18:34:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 03 Apr 2019 18:34:56 +0000 (UTC) for IP:'209.85.215.193' DOMAIN:'mail-pg1-f193.google.com' HELO:'mail-pg1-f193.google.com' FROM:'syedhumaidbinharoon@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.193 mail-pg1-f193.google.com 209.85.215.193 mail-pg1-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Humaid Subject: [libvirt] [PATCH] virErrorPreserveLast conversions X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 03 Apr 2019 18:35:04 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Humaid Converted few instances of virSaveLastError() to virErrorPreserveLast() as = per the newer internal APIs for saving and restoring error reports. Signed-off-by: Syed Humaid =20 --- src/libvirt-domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index be5b1f6740..fba4d98994 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -2894,7 +2894,7 @@ virDomainMigrateVersion2(virDomainPtr domain, _("domainMigratePrepare2 did not set uri")); cancelled =3D 1; /* Make sure Finish doesn't overwrite the error */ - orig_err =3D virSaveLastError(); + virErrorPreserveLast(&orig_err); goto finish; } if (uri_out) @@ -2909,7 +2909,7 @@ virDomainMigrateVersion2(virDomainPtr domain, =20 /* Perform failed. Make sure Finish doesn't overwrite the error */ if (ret < 0) - orig_err =3D virSaveLastError(); + virErrorPreserveLast(&orig_err); =20 /* If Perform returns < 0, then we need to cancel the VM * startup on the destination @@ -3100,7 +3100,7 @@ virDomainMigrateVersion3Full(virDomainPtr domain, virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("domainMigratePrepare3 did not set uri")); cancelled =3D 1; - orig_err =3D virSaveLastError(); + virErrorPreserveLast(&orig_err); goto finish; } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list