From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cxTX9-0006w5-3u for barebox@lists.infradead.org; Mon, 10 Apr 2017 07:14:45 +0000 From: Sascha Hauer Date: Mon, 10 Apr 2017 09:14:17 +0200 Message-Id: <20170410071420.26884-8-s.hauer@pengutronix.de> In-Reply-To: <20170410071420.26884-1-s.hauer@pengutronix.de> References: <20170410071420.26884-1-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 07/10] net: use dev_add_param_string To: Barebox List dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer --- net/net.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/net.c b/net/net.c index 3c0e715601..19b081f6cf 100644 --- a/net/net.c +++ b/net/net.c @@ -573,6 +573,9 @@ static struct device_d net_device = { .id = DEVICE_ID_SINGLE, }; +static char *net_nameserver; +static char *net_domainname; + static int net_init(void) { int i; @@ -581,8 +584,12 @@ static int net_init(void) NetRxPackets[i] = net_alloc_packet(); register_device(&net_device); - dev_add_param(&net_device, "nameserver", NULL, NULL, 0); - dev_add_param(&net_device, "domainname", NULL, NULL, 0); + net_nameserver = xstrdup(""); + dev_add_param_string(&net_device, "nameserver", NULL, NULL, + &net_nameserver, NULL); + net_domainname = xstrdup(""); + dev_add_param_string(&net_device, "domainname", NULL, NULL, + &net_domainname, NULL); return 0; } -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox