From nobody Sun May 19 01:15:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554919476; cv=none; d=zoho.com; s=zohoarc; b=i6PEMHq7yrpNfDtG6IkITudowGkenowGI02BJ4GerWxVbhkqM7YMIloWnzTL/4/008EdEOnY4b2n1ybfsoUVJB410fYV7xjSGJCEiyd9UQ+YxlmIEWNQJHFI9E5zDdz319R+q0tlZD6vJKcihPxIn5lugoigH6kV4sXhk0qkrMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554919476; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=//0XlXqHSzOfxjjZ3G55NMx+0mkXB2CRUFcQlHiQuPM=; b=kxmBtJILUBg/LYs3jkPUFqcigb2ZWRCF2a1WuRS8EwU4ysWg6oBToPv+WrD8964MfuAkzXxXu+8Q9H/4oG6TL74OI/wSDvwmlMHy53hyg9iKqlaeyHzPRKTqbN/hDMq07FJBPeKOVlTt3hGrTJ24ZAh8ElR1zF6X9oKCOkIpjMY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554919476483198.24567188918047; Wed, 10 Apr 2019 11:04:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:35407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEHaI-000358-IK for importer@patchew.org; Wed, 10 Apr 2019 14:04:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEHZS-0002o7-HO for qemu-devel@nongnu.org; Wed, 10 Apr 2019 14:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEHZR-0001fE-MT for qemu-devel@nongnu.org; Wed, 10 Apr 2019 14:03:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEHZR-0001ep-ER for qemu-devel@nongnu.org; Wed, 10 Apr 2019 14:03:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE42781E19 for ; Wed, 10 Apr 2019 18:03:36 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-123-233.rdu2.redhat.com [10.10.123.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFFFA5C3FD; Wed, 10 Apr 2019 18:03:35 +0000 (UTC) From: Cole Robinson To: qemu-devel@nongnu.org Date: Wed, 10 Apr 2019 14:03:31 -0400 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 10 Apr 2019 18:03:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] hmp: delvm: use hmp_handle_error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dgilbert@redhat.com, Cole Robinson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This gives us the consistent 'Error:' prefix added in 66363e9a43f, which helps users like libvirt who still need to scrape hmp error messages to detect failure. Signed-off-by: Cole Robinson Reviewed-by: Eric Blake --- hmp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hmp.c b/hmp.c index 8eec768088..74a4bfc1f9 100644 --- a/hmp.c +++ b/hmp.c @@ -1481,10 +1481,11 @@ void hmp_delvm(Monitor *mon, const QDict *qdict) const char *name =3D qdict_get_str(qdict, "name"); =20 if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) { - error_reportf_err(err, - "Error while deleting snapshot on device '%s': ", - bdrv_get_device_name(bs)); + error_prepend(&err, + "Error while deleting snapshot on device '%s': ", + bdrv_get_device_name(bs)); } + hmp_handle_error(mon, &err); } =20 void hmp_info_snapshots(Monitor *mon, const QDict *qdict) --=20 2.21.0