From patchwork Fri Jun 7 19:52:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 249809 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 828C42C00AC for ; Sat, 8 Jun 2013 05:58:54 +1000 (EST) Received: from localhost ([::1]:40526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2oG-0003Un-NN for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2013 15:58:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2iL-0002SP-6G for qemu-devel@nongnu.org; Fri, 07 Jun 2013 15:52:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul2iK-00035m-BH for qemu-devel@nongnu.org; Fri, 07 Jun 2013 15:52:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul2iK-00035f-3P for qemu-devel@nongnu.org; Fri, 07 Jun 2013 15:52:44 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r57Jqhfd032576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jun 2013 15:52:43 -0400 Received: from localhost (ovpn-113-73.phx2.redhat.com [10.3.113.73]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r57JqgPZ013158; Fri, 7 Jun 2013 15:52:43 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2013 15:52:33 -0400 Message-Id: <1370634755-18132-8-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1370634755-18132-1-git-send-email-lcapitulino@redhat.com> References: <1370634755-18132-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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 Subject: [Qemu-devel] [PATCH 7/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; } }