[PATCH 4/8] net: register a 'net' device to store network specific variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'nameserver' and 'domainname' should be globally available variables
specific to networking. Register a 'net' device to store these variables.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 net/net.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/net/net.c b/net/net.c
index d164992..6e2c14b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -666,6 +666,11 @@ out:
 	return ret;
 }
 
+static struct device_d net_device = {
+	.name = "net",
+	.id = DEVICE_ID_SINGLE,
+};
+
 static int net_init(void)
 {
 	int i;
@@ -673,6 +678,10 @@ static int net_init(void)
 	for (i = 0; i < PKTBUFSRX; i++)
 		NetRxPackets[i] =  xmemalign(32, PKTSIZE);
 
+	register_device(&net_device);
+	dev_add_param(&net_device, "nameserver", NULL, NULL, 0);
+	dev_add_param(&net_device, "domainname", NULL, NULL, 0);
+
 	return 0;
 }
 
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux