diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-15 16:03:41 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-15 16:26:03 +0200 |
commit | 9058b01ebc9519b40e006c20c5e393787d271232 (patch) | |
tree | 04b37ed241c8a712b11a1185d28cb85fa877d310 /net | |
parent | dbd4e1166ead4579e959a3c799a22fa2780d845d (diff) | |
download | barebox-9058b01ebc9519b40e006c20c5e393787d271232.tar.gz barebox-9058b01ebc9519b40e006c20c5e393787d271232.tar.xz |
net: register a 'net' device to store network specific variables
'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@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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; } |