diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-26 09:32:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-26 09:32:09 +0100 |
commit | 7724c766bdfba5f3af5cdf5d869bcf03f45149e3 (patch) | |
tree | d1cb0db7b683bdc9c9ecb954cc83dea7d53ae440 /networking/udhcp/files.c | |
parent | a8f6b9998727ad67db4b812270a1bbceea011dde (diff) | |
download | busybox-w32-7724c766bdfba5f3af5cdf5d869bcf03f45149e3.tar.gz busybox-w32-7724c766bdfba5f3af5cdf5d869bcf03f45149e3.tar.bz2 busybox-w32-7724c766bdfba5f3af5cdf5d869bcf03f45149e3.zip |
udhcp: pass pointer to whole packet to "add option" functions
This is needed for "overflow option" support
function old new delta
udhcp_find_option - 34 +34
udhcp_add_binary_option 94 106 +12
write_leases 227 223 -4
udhcp_init_header 86 82 -4
send_release 104 99 -5
init_packet 87 81 -6
add_client_options 160 154 -6
add_server_options 100 92 -8
udhcpd_main 1964 1954 -10
udhcpc_main 2859 2837 -22
find_option 34 - -34
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/8 up/down: 46/-99) Total: -53 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 1f25bb105..cf55a6b5c 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -167,10 +167,11 @@ void FAST_FUNC write_leases(void) | |||
167 | close(fd); | 167 | close(fd); |
168 | 168 | ||
169 | if (server_config.notify_file) { | 169 | if (server_config.notify_file) { |
170 | // TODO: vfork-based child creation | 170 | char *argv[3]; |
171 | char *cmd = xasprintf("%s %s", server_config.notify_file, server_config.lease_file); | 171 | argv[0] = server_config.notify_file; |
172 | system(cmd); | 172 | argv[1] = server_config.lease_file; |
173 | free(cmd); | 173 | argv[2] = NULL; |
174 | spawn_and_wait(argv); | ||
174 | } | 175 | } |
175 | } | 176 | } |
176 | 177 | ||