From patchwork Mon Jun 10 17:02:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 250311 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 49B1F2C0092 for ; Tue, 11 Jun 2013 03:07:12 +1000 (EST) Received: from localhost ([::1]:56957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um5Yk-0005kS-9Q for incoming@patchwork.ozlabs.org; Mon, 10 Jun 2013 13:07:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um5UQ-0000IU-2M for qemu-devel@nongnu.org; Mon, 10 Jun 2013 13:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Um5UK-0002Ya-Mn for qemu-devel@nongnu.org; Mon, 10 Jun 2013 13:02:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um5UK-0002YB-GQ for qemu-devel@nongnu.org; Mon, 10 Jun 2013 13:02:36 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5AH2ZPY022931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Jun 2013 13:02:36 -0400 Received: from localhost (ovpn-113-96.phx2.redhat.com [10.3.113.96]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5AH2ZjU026883; Mon, 10 Jun 2013 13:02:35 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Mon, 10 Jun 2013 13:02:25 -0400 Message-Id: <1370883748-31439-7-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1370883748-31439-1-git-send-email-lcapitulino@redhat.com> References: <1370883748-31439-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, armbru@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH 6/9] dump: qmp_dump_guest_memory(): use error_setg_file_open() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Luiz Capitulino --- dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump.c b/dump.c index c0d3da5..28fd296 100644 --- a/dump.c +++ b/dump.c @@ -847,7 +847,7 @@ void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin, if (strstart(file, "file:", &p)) { fd = qemu_open(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR); if (fd < 0) { - error_set(errp, QERR_OPEN_FILE_FAILED, p); + error_setg_file_open(errp, errno, p); return; } }