From nobody Fri May 3 18:30:58 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=1598556146; cv=none; d=zohomail.com; s=zohoarc; b=A4lwLmzQS464yJmPnYUNOlzuYBO3JBI7OUYGxM//6ZmP6KTW+201kreXI3chHch+J3F8n6gp4QhQLQ9G+LUuIXEERV6RL1z8NkhkhBYhI61Nk4Q7zMmoMOSG+RK/OzW6mQxt2OaM/B2lNKWJ/FtA0sg37AhS6cYpKakSUpQFEDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598556146; 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=Rv0/mkeN7onw5Qh7LBcM16af255gee1MqkoZN+FWEM/953Y60q9QBelzAzmnDH6C3/e8PQqPFGiS5VPn5qfmirG6rM9PIYr5bMUIi4zCEtap28ByABtb3qJ5lM1uSsbb9xqTMOF8Qvho5YDS9lAT5DRlUWITAkvR89qCHVx9HC8= 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 1598556146209442.093151770339; Thu, 27 Aug 2020 12:22:26 -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 1kBNTJ-0007q9-1L; Thu, 27 Aug 2020 19:22:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBNTH-0007q2-LT for xen-devel@lists.xenproject.org; Thu, 27 Aug 2020 19:22:03 +0000 Received: from mx.upb.ro (unknown [141.85.13.250]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4bb75524-a619-4cd3-ad4e-c35f28024fa2; Thu, 27 Aug 2020 19:22:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 4D3C3B561EB6; Thu, 27 Aug 2020 22:22:00 +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 v1h6na_2yrWp; Thu, 27 Aug 2020 22:21:58 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mx.upb.ro (Postfix) with ESMTP id 70D6EB561EEC; Thu, 27 Aug 2020 22:21:58 +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 dwV7eRlWnW-h; Thu, 27 Aug 2020 22:21:58 +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 1578CB561EB6; Thu, 27 Aug 2020 22:21:57 +0300 (EEST) X-Inumbo-ID: 4bb75524-a619-4cd3-ad4e-c35f28024fa2 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:21:57 +0300 Message-Id: <20200827192157.30648-1-costin.lupu@cs.pub.ro> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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