From patchwork Mon Jun 6 10:52:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9157841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9612860467 for ; Mon, 6 Jun 2016 10:54:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86F372665D for ; Mon, 6 Jun 2016 10:54:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD3426E82; Mon, 6 Jun 2016 10:54:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 43FD42665D for ; Mon, 6 Jun 2016 10:54:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9s9X-0004lq-3Y; Mon, 06 Jun 2016 10:53:03 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9s9V-0004lG-Du for xen-devel@lists.xenproject.org; Mon, 06 Jun 2016 10:53:01 +0000 Received: from [193.109.254.147] by server-7.bemta-14.messagelabs.com id 7A/B9-25102-C0655575; Mon, 06 Jun 2016 10:53:00 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXitHSDvS5PWGi 4wdRPghbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8a1c/2sBW9YK6beXM/YwHiepYuRk0NCwF+i 6/FjJhCbTUBZ4mdnLxuILSKgJ9F04DkjiM0s4CXxY0UPO4gtLBAkceLGITCbRUBF4trGf8xdj BwcvALOEjt70yFGykmcP/6TGcTmFHCReLdtByuILQRU8qH7CQuErSDRMf0Y2FpeAUGJkzMh4s wCEhIHX7wAGykhwC3xt9t+AiPfLCRVs5BULWBkWsWoUZxaVJZapGtorpdUlJmeUZKbmJmja2h oopebWlycmJ6ak5hUrJecn7uJERhQ9QwMjDsYf572PMQoycGkJMor+zUkXIgvKT+lMiOxOCO+ qDQntfgQowwHh5IEr35oaLiQYFFqempFWmYOMLRh0hIcPEoivBkgad7igsTc4sx0iNQpRl2OB T9ur2USYsnLz0uVEucVBSkSACnKKM2DGwGLs0uMslLCvIwMDAxCPAWpRbmZJajyrxjFORiVhH mfhwBN4cnMK4Hb9AroCCagI5ZdCwY5oiQRISXVwOjzpXLaft/9K06zzX0ed+b3khurO1MvXM3 YKxHQfXnJzpZM3h+tcqWd6ZPnzLVd25AkwvlGdOq+9OMWMtfezOmUXnHr2be/x9dJr/50otRf ceO6ut9h0SE+bUt0V5mdDd4t/9nxxswFHcLLGsWd9eUfbb74r2up3uvz52cKVx1607nx7nE+l jNuSizFGYmGWsxFxYkA3EmiA64CAAA= X-Env-Sender: prvs=9584f9c1d=wei.liu2@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1465210376!45691042!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9493 invoked from network); 6 Jun 2016 10:53:00 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jun 2016 10:53:00 -0000 X-IronPort-AV: E=Sophos;i="5.26,426,1459814400"; d="scan'208";a="365458269" From: Wei Liu To: Xen-devel Date: Mon, 6 Jun 2016 11:52:12 +0100 Message-ID: <1465210332-25440-7-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465210332-25440-1-git-send-email-wei.liu2@citrix.com> References: <1465210332-25440-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH 6/6] libxl: log file name in failure in libxl__create_qemu_logfile X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 155a653..69d2242 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -52,13 +52,15 @@ static int libxl__create_qemu_logfile(libxl__gc *gc, char *name) if (rc) return rc; logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644); - free(logfile); if (logfile_w < 0) { - LOGE(ERROR, "unable to open Qemu logfile"); + LOGE(ERROR, "unable to open Qemu logfile: %s", logfile); + free(logfile); return ERROR_FAIL; } + free(logfile); + return logfile_w; }