aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-25 20:32:38 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-25 20:32:38 +0100
commit7e6add1dfca95183bf409820066fab975979bf06 (patch)
tree0da56954d93e9b10e956235a32f0d0644a60063b /networking/udhcp/files.c
parent0454d9d6c314f381eee8022ad4e7447d2fa1dcf1 (diff)
downloadbusybox-7e6add1dfca95183bf409820066fab975979bf06.tar.gz
udhcpc: add -x OPT:VAL option
function old new delta udhcp_str2optset - 443 +443 add_client_options - 160 +160 udhcpc_main 2753 2857 +104 packed_usage 26670 26689 +19 attach_option 380 385 +5 udhcpd_main 1964 1965 +1 udhcp_add_option_string 94 86 -8 add_param_req_option 128 - -128 read_opt 443 - -443 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 4/1 up/down: 732/-579) Total: 153 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 05a7b998a..fddda4cba 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -145,7 +145,7 @@ static NOINLINE void attach_option(
}
/* read a dhcp option and add it to opt_list */
-static int FAST_FUNC read_opt(const char *const_line, void *arg)
+int FAST_FUNC udhcp_str2optset(const char *const_line, void *arg)
{
struct option_set **opt_list = arg;
char *opt, *val, *endptr;
@@ -292,8 +292,8 @@ static const struct config_keyword keywords[] = {
{"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
{"siaddr", read_nip, &(server_config.siaddr_nip), "0.0.0.0"},
/* keywords with no defaults must be last! */
- {"option", read_opt, &(server_config.options), ""},
- {"opt", read_opt, &(server_config.options), ""},
+ {"option", udhcp_str2optset, &(server_config.options), ""},
+ {"opt", udhcp_str2optset, &(server_config.options), ""},
{"notify_file", read_str, &(server_config.notify_file), ""},
{"sname", read_str, &(server_config.sname), ""},
{"boot_file", read_str, &(server_config.boot_file), ""},