From patchwork Thu Nov 17 17:36:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9434807 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 C643960755 for ; Thu, 17 Nov 2016 17:38:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B99F128644 for ; Thu, 17 Nov 2016 17:38:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADCE52968C; Thu, 17 Nov 2016 17:38:40 +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 42E8D29689 for ; Thu, 17 Nov 2016 17:38:40 +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 1c7QcL-0000Lt-Cb; Thu, 17 Nov 2016 17:36:57 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7QcJ-0000G7-Uo for xen-devel@lists.xen.org; Thu, 17 Nov 2016 17:36:56 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 58/DA-31715-7BAED285; Thu, 17 Nov 2016 17:36:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42I53H6XVXfbK90 Ig8crNC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1owr27IKHgtUnF97hLWBcTlPFyMXh5DAEkaJ xfenMXYxcnKwCdhLdP05ygRiiwhIS1z7fBkszixQIrH3aQeYLSzgKHF46m4WEJtFQFXi/YsbY HFeAQuJL/MWMoPYEgLyEheungKr4QSKHzh8DiwuJGAu8ebNAiaIekGJkzOfANVwAM1Xl1g/Tw hilbxE89bZzBMYeWchqZqFUDULSdUCRuZVjBrFqUVlqUW6RsZ6SUWZ6RkluYmZObqGBsZ6uan FxYnpqTmJScV6yfm5mxiBAVXPwMC4g7Fvr98hRkkOJiVRXuaXuhFCfEn5KZUZicUZ8UWlOanF hxhlODiUJHgLQHKCRanpqRVpmTnA0IZJS3DwKInwSoKkeYsLEnOLM9MhUqcYFaXEeU+DJARAE hmleXBtsHi6xCgrJczLyMDAIMRTkFqUm1mCKv+KUZyDUUmY9wHIFJ7MvBK46a+AFjMBLd4joA OyuCQRISXVwCg5dZHW3MuRu7Yqivna57o87yi7Le/T9nfBzKWnbyWyZkU/sgyZOcXyquRK2z9 zQn80Li7xiWzIMCgKf/V68u4Vne/3frlRffHD+YhqjoJ18/0lO9NOi12NScvNYDOJl4qcdeX/ 8gW/noquv7dM5Mzb8EXr2u6f7WdP03IQbj8pvDq+6p+tELcSS3FGoqEWc1FxIgA4pf0hogIAA A== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1479404214!45193078!1 X-Originating-IP: [195.135.221.5] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23887 invoked from network); 17 Nov 2016 17:36:54 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-6.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Nov 2016 17:36:54 -0000 Received: from laptop.vms (mhy71-2-88-167-63-197.fbx.proxad.net [88.167.63.197]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Thu, 17 Nov 2016 18:36:53 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Thu, 17 Nov 2016 18:36:05 +0100 Message-Id: <20161117173617.6697-24-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161117173617.6697-1-cbosdonnat@suse.com> References: <20161117173617.6697-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: Wei Liu , Ian Jackson , Cedric Bosdonnat Subject: [Xen-devel] [PATCH v2 23/35] libxl/libxl_nic.c: used LOG*D functions 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 From: Cedric Bosdonnat Use LOG*D logging functions where possible instead of the LOG* ones. Signed-off-by: Cédric Bosdonnat --- tools/libxl/libxl_nic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c index 220a028..61b55ca 100644 --- a/tools/libxl/libxl_nic.c +++ b/tools/libxl/libxl_nic.c @@ -101,7 +101,8 @@ int libxl__device_nic_setdefault(libxl__gc *gc, libxl_device_nic *nic, break; case LIBXL_DOMAIN_TYPE_PV: if (nic->nictype == LIBXL_NIC_TYPE_VIF_IOEMU) { - LOG(ERROR, "trying to create PV guest with an emulated interface"); + LOGD(ERROR, domid, + "trying to create PV guest with an emulated interface"); return ERROR_INVAL; } nic->nictype = LIBXL_NIC_TYPE_VIF; @@ -254,7 +255,7 @@ static void libxl__device_nic_add(libxl__egc *egc, uint32_t domid, rc = libxl__device_exists(gc, t, device); if (rc < 0) goto out; if (rc == 1) { /* already exists in xenstore */ - LOG(ERROR, "device already exists in xenstore"); + LOGD(ERROR, domid, "device already exists in xenstore"); aodev->action = LIBXL__DEVICE_ACTION_ADD; /* for error message */ rc = ERROR_DEVICE_EXISTS; goto out; @@ -440,7 +441,7 @@ libxl_device_nic *libxl_device_nic_list(libxl_ctx *ctx, uint32_t domid, int *num return nics; out_err: - LOG(ERROR, "Unable to list nics"); + LOGD(ERROR, domid, "Unable to list nics"); while (*num) { (*num)--; libxl_device_nic_dispose(&nics[*num]); @@ -531,7 +532,7 @@ int libxl__device_nic_set_devids(libxl__gc *gc, libxl_domain_config *d_config, ret = libxl__device_nic_setdefault(gc, &d_config->nics[i], domid, false); if (ret) { - LOG(ERROR, "Unable to set nic defaults for nic %d", i); + LOGD(ERROR, domid, "Unable to set nic defaults for nic %d", i); goto out; }