From patchwork Tue Nov 15 10:19:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9429367 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 AB6F760755 for ; Tue, 15 Nov 2016 10:22:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 937CD286B9 for ; Tue, 15 Nov 2016 10:22:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 888E0286C4; Tue, 15 Nov 2016 10:22:27 +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 42E4F2872C for ; Tue, 15 Nov 2016 10:22:27 +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 1c6aqi-0005zL-39; Tue, 15 Nov 2016 10:20:20 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6aqg-0005sS-BM for xen-devel@lists.xen.org; Tue, 15 Nov 2016 10:20:18 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id C8/A1-01666-F51EA285; Tue, 15 Nov 2016 10:20:15 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsVyuP0uq270Q60 Ig7NXtS2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oxDn+4zF7wUqLjwULSBcS1PFyMXh5DAEkaJ zp9djF2MnBxsAvYSXX+OMoHYIgLSEtc+X2YEKWIWOMEo0bNxMxtIQljATuLG18XsIDaLgKpE8 5r/zCA2r4ClxMe3H1hAbAkBeYkLV0+B2ZxA8Z9Hn4LVCwlYSCy53A1VLyhxcuYToBoOoAXqEu vnCYGEmYFam7fOZp7AyDsLSdUshKpZSKoWMDKvYtQoTi0qSy3SNTTRSyrKTM8oyU3MzNE1NDD Vy00tLk5MT81JTCrWS87P3cQIDCkGINjBePa05yFGSQ4mJVFeodVaEUJ8SfkplRmJxRnxRaU5 qcWHGGU4OJQkeCc8AMoJFqWmp1akZeYAgxsmLcHBoyTCGwOS5i0uSMwtzkyHSJ1iVJQS5w0AS QiAJDJK8+DaYBF1iVFWSpiXEegQIZ6C1KLczBJU+VeM4hyMSsK8aSBTeDLzSuCmvwJazAS0eJ e5BsjikkSElFQDY8YnK4Y+871aW9KXOMzw/3Mr9MF6tWT9CN4lrtY8z/w25M3//ojTMGt+zXx erfjYF4qzrlZlvn++0vD0qScr3UwLlzTzPrnufOpEj67WC4eCTX+8z/68cmtDrQ6XVoj0Evs0 UyezCpePEsI/zv055JQmKdp0eq9ZKWMa4zylJO9gy/P1j1XblViKMxINtZiLihMBcIkaT6MCA AA= X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1479205211!66721857!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 62799 invoked from network); 15 Nov 2016 10:20:11 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-3.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Nov 2016 10:20:11 -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); Tue, 15 Nov 2016 11:20:10 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Tue, 15 Nov 2016 11:19:01 +0100 Message-Id: <20161115101913.10396-24-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161115101913.10396-1-cbosdonnat@suse.com> References: <20161115101913.10396-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= , Wei Liu , Ian Jackson , =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Subject: [Xen-devel] [PATCH 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: Cédric 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; }