aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-05-31 23:39:22 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-05-31 23:39:22 +0200
commit65c34c52df3ed46f0b811d1858c271a373ab6af5 (patch)
tree8c9a08f6ff1b442dbb642995d1870cb2efd87a0d /networking/udhcp/d6_dhcpc.c
parent91755cb16d496d1094f5d81051a1e1e6f27a21c1 (diff)
downloadbusybox-w32-65c34c52df3ed46f0b811d1858c271a373ab6af5.tar.gz
busybox-w32-65c34c52df3ed46f0b811d1858c271a373ab6af5.tar.bz2
busybox-w32-65c34c52df3ed46f0b811d1858c271a373ab6af5.zip
dhcp: get rid of static data signal_pipe
function old new delta udhcp_sp_setup 65 110 +45 udhcp_sp_fd_set 60 59 -1 udhcpd_main 1442 1437 -5 udhcpc_main 2684 2679 -5 signal_pipe 8 - -8 packed_usage 33292 33284 -8 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 45/-27) Total: 18 bytes text data bss dec hex filename 952746 481 7296 960523 ea80b busybox_old 952768 481 7288 960537 ea819 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/d6_dhcpc.c')
-rw-r--r--networking/udhcp/d6_dhcpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 15e9f3924..02766ba16 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1174,6 +1174,10 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
1174 client_data.script = CONFIG_UDHCPC_DEFAULT_SCRIPT; 1174 client_data.script = CONFIG_UDHCPC_DEFAULT_SCRIPT;
1175 client_data.sockfd = -1; 1175 client_data.sockfd = -1;
1176 1176
1177 /* Make sure fd 0,1,2 are open */
1178 /* Set up the signal pipe on fds 3,4 - must be before openlog() */
1179 udhcp_sp_setup();
1180
1177 /* Parse command line */ 1181 /* Parse command line */
1178 opt = getopt32long(argv, "^" 1182 opt = getopt32long(argv, "^"
1179 /* O,x: list; -T,-t,-A take numeric param */ 1183 /* O,x: list; -T,-t,-A take numeric param */
@@ -1268,14 +1272,10 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
1268 logmode |= LOGMODE_SYSLOG; 1272 logmode |= LOGMODE_SYSLOG;
1269 } 1273 }
1270 1274
1271 /* Make sure fd 0,1,2 are open */
1272 bb_sanitize_stdio();
1273 /* Create pidfile */ 1275 /* Create pidfile */
1274 write_pidfile(client_data.pidfile); 1276 write_pidfile(client_data.pidfile);
1275 /* Goes to stdout (unless NOMMU) and possibly syslog */ 1277 /* Goes to stdout (unless NOMMU) and possibly syslog */
1276 bb_info_msg("started, v"BB_VER); 1278 bb_info_msg("started, v"BB_VER);
1277 /* Set up the signal pipe */
1278 udhcp_sp_setup();
1279 1279
1280 client_data.state = INIT_SELECTING; 1280 client_data.state = INIT_SELECTING;
1281 d6_run_script_no_option("deconfig"); 1281 d6_run_script_no_option("deconfig");