From patchwork Fri Dec 2 15:08:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9458697 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 4ED9E60236 for ; Fri, 2 Dec 2016 15:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4179E2847C for ; Fri, 2 Dec 2016 15:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 364932855C; Fri, 2 Dec 2016 15:11:23 +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 19F6D2847C for ; Fri, 2 Dec 2016 15:11:22 +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 1cCpSp-0003QB-6m; Fri, 02 Dec 2016 15:09:27 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cCpSn-0003JI-JU for xen-devel@lists.xen.org; Fri, 02 Dec 2016 15:09:25 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id 3B/B7-28694-4AE81485; Fri, 02 Dec 2016 15:09:24 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeJIrShJLcpLzFFi42I53H6XVXdJn2O EQdMXZYslHxezODB6HN39mymAMYo1My8pvyKBNePlqpOMBd2CFXNut7M3MJ7m6WLk5BASWMIo 0TDJHsRmE7CX6PpzlAnEFhGQlrj2+TIjiM0sUCLRdK6TGcQWFnCUODx1NwuIzSKgKjFv4VOwO K+ApcSJo2vBeiUE5CUWnj8CZnMCxR+0XGeE2GUh0XzjDgtEvaDEyZlPgGwOoPnqEuvnCUGskp do3jqbeQIj7ywkVbMQqmYhqVrAyLyKUaM4tagstUjX0FIvqSgzPaMkNzEzR9fQwEwvN7W4ODE 9NScxqVgvOT93EyMwoBiAYAfjj2UBhxglOZiURHlNcxwjhPiS8lMqMxKLM+KLSnNSiw8xynBw KEnwNvcC5QSLUtNTK9Iyc4ChDZOW4OBREuFVBUnzFhck5hZnpkOkTjEqSonzOoMkBEASGaV5c G2weLrEKCslzMsIdIgQT0FqUW5mCar8K0ZxDkYlYd5GkCk8mXklcNNfAS1mAlrccd0eZHFJIk JKqoHRvdXk3LQAzkxmzT1uytqi/2eJzbqW+WSazPFtC+J/zN28cXur6yNhfmneSRZBMdLvlcy cWP2nXf264KzJ+otN4hNF3V+6XdyyfVJv4NzrVg995mvpqmZsP7rCMnrF5aOGry66Bkt3rD68 erO74Y3JrzbfP1f5atf5yDNv/0zQEzGxVNz/JnGZnRJLcUaioRZzUXEiAOOu1iqiAgAA X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-12.tower-21.messagelabs.com!1480691364!46404677!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 51511 invoked from network); 2 Dec 2016 15:09:24 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-12.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 2 Dec 2016 15:09:24 -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); Fri, 02 Dec 2016 16:09:20 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Fri, 2 Dec 2016 16:08:29 +0100 Message-Id: <20161202150841.31227-24-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161202150841.31227-1-cbosdonnat@suse.com> References: <20161202150841.31227-1-cbosdonnat@suse.com> MIME-Version: 1.0 Cc: Ian Jackson , Wei Liu , 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 Acked-by: Wei Liu --- 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; }