[PATCH 5/5] dhcp: Add magicvars

Sascha Hauer s.hauer at pengutronix.de
Sun Nov 27 07:09:40 EST 2011


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 net/dhcp.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/dhcp.c b/net/dhcp.c
index d1781bc..954c52e 100644
--- a/net/dhcp.c
+++ b/net/dhcp.c
@@ -15,6 +15,7 @@
 #include <net.h>
 #include <libbb.h>
 #include <errno.h>
+#include <magicvar.h>
 #include <linux/err.h>
 
 #define OPT_SIZE 312	/* Minimum DHCP Options size per RFC2131 - results in 576 byte pkt */
@@ -482,3 +483,8 @@ BAREBOX_CMD_START(dhcp)
 	.usage		= "invoke dhcp client to obtain ip/boot params",
 BAREBOX_CMD_END
 
+BAREBOX_MAGIC_VAR(bootfile, "bootfile returned from DHCP request");
+BAREBOX_MAGIC_VAR(nameserver, "Nameserver returned from DHCP request");
+BAREBOX_MAGIC_VAR(hostname, "hostname returned from DHCP request");
+BAREBOX_MAGIC_VAR(domainname, "domainname returned from DHCP request");
+BAREBOX_MAGIC_VAR(rootpath, "rootpath returned from DHCP request");
-- 
1.7.7.1




More information about the barebox mailing list