From nobody Sun May 5 11:19:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1598588361; cv=none; d=zohomail.com; s=zohoarc; b=MpKwDieGpIbR/+ZbeGudjRZEsKN7ZAMoNZqIhZaTIEgq37hhoYSn91xpoMJhLE/Om3i2+GvyJYQ+gJeqRGetW6Q78T4ZaC30pOMDPVsujbY6n/5h8GegUb8ml5GnpLL0+GD1zYHIC4zjY3c/Xhn52QNDRzGkVRNBb+zT4Cl0NXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598588361; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ssC8yC730UiaXZdjW+h6xRjA6a23GEFvPe10TDRG+Nc=; b=bBEcIdEpvTZXps/Au5HF4Z0PrwFKgbJ/9gxu9f9GIqGbXlGuenySlePfEH72thZGwHtURB8ZlfqYH+W3MkwWv9hRjb7LytwiArlsXJSFNBAhcLHvLWaKMlgnxZXsi25jFoz3h1Y3KF5O+/VPUAQozYVCbG/PAnBZr+mXn3wzZoU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1598588361338182.68503364092908; Thu, 27 Aug 2020 21:19:21 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBVqr-0002tw-9Z; Fri, 28 Aug 2020 04:18:57 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBNKe-0006sC-1w for xen-devel@lists.xenproject.org; Thu, 27 Aug 2020 19:13:08 +0000 Received: from mx.upb.ro (unknown [141.85.13.230]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 903b663e-eb72-4fb3-ac75-a77555f11614; Thu, 27 Aug 2020 19:13:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id BC55DB560090; Thu, 27 Aug 2020 22:13:04 +0300 (EEST) Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id k42oH7HSa-do; Thu, 27 Aug 2020 22:13:02 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 0F715B561EB6; Thu, 27 Aug 2020 22:13:02 +0300 (EEST) Received: from mx.upb.ro ([127.0.0.1]) by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ypTezSY2kFQC; Thu, 27 Aug 2020 22:13:01 +0300 (EEST) Received: from localhost.localdomain (5-12-253-103.residential.rdsnet.ro [5.12.253.103]) by mx.upb.ro (Postfix) with ESMTPSA id AB60FB560090; Thu, 27 Aug 2020 22:13:01 +0300 (EEST) X-Inumbo-ID: 903b663e-eb72-4fb3-ac75-a77555f11614 X-Virus-Scanned: amavisd-new at upb.ro From: Costin Lupu To: xen-devel@lists.xenproject.org Cc: samuel.thibault@ens-lyon.org, wl@xen.org, jbeulich@suse.com Subject: [PATCH] stubdom/grub: Update init_netfront() call for mini-os Date: Thu, 27 Aug 2020 22:12:57 +0300 Message-Id: <20200827191257.30100-1-costin.lupu@cs.pub.ro> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 28 Aug 2020 04:18:56 +0000 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" This patch updates the call of init_netfront() function according to its recently updated declaration which can also include parameters for gateway and netmask addresses. While we are here, the patch also removes passing the ip parameter because (a) it is not used anywhere and (b) it wastes memory since it would reference a dynamically allocated string. Signed-off-by: Costin Lupu Reported-by: Jan Beulich Reviewed-by: Samuel Thibault --- stubdom/grub/mini-os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c index 4fc052a255..b33dbf02fb 100644 --- a/stubdom/grub/mini-os.c +++ b/stubdom/grub/mini-os.c @@ -291,8 +291,6 @@ struct netfront_dev *net_dev; int minios_probe (struct nic *nic) { - char *ip; - if (net_dev) return 1; =20 @@ -300,7 +298,7 @@ minios_probe (struct nic *nic) grub_memset ((char *) arptable, 0, MAX_ARP * sizeof (struct arptable_t)); =20 - net_dev =3D init_netfront(NULL, (void*) -1, nic->node_addr, &ip); + net_dev =3D init_netfront(NULL, (void*) -1, nic->node_addr, NULL, NULL= , NULL); if (!net_dev) return 0; =20 --=20 2.20.1