aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/common.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-02 22:31:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-02 22:31:05 +0000
commit80edead5ea731c0c144def4d249eb88fb16001ef (patch)
tree1aca5341f9b412edd03f9edf32ea5f649a2bf242 /networking/udhcp/common.c
parentc01af95c398b21203cd991917101e29b21821284 (diff)
downloadbusybox-w32-80edead5ea731c0c144def4d249eb88fb16001ef.tar.gz
busybox-w32-80edead5ea731c0c144def4d249eb88fb16001ef.tar.bz2
busybox-w32-80edead5ea731c0c144def4d249eb88fb16001ef.zip
udhcp: slight shrink
udhcpd_main 1171 1208 +37 udhcpc_main 2363 2387 +24 dhcprelay_main 1145 1146 +1 dhcprelay_stopflag 4 1 -3 dhcprelay_signal_handler 11 8 -3 client_background 46 42 -4 udhcp_read_interface 230 211 -19 udhcp_make_pidfile 76 - -76 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 3/4 up/down: 62/-105) Total: -43 bytes text data bss dec hex filename 770052 1096 11228 782376 bf028 busybox_old 769980 1096 11228 782304 befe0 busybox_unstripped
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r--networking/udhcp/common.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 108ab2e95..59c015575 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -1,30 +1,9 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* common.c 2/* common.c
3 * 3 *
4 * Functions for debugging and logging as well as some other
5 * simple helper functions.
6 *
7 * Russ Dill <Russ.Dill@asu.edu> 2001-2003
8 * Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
9 *
10 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 4 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
11 */ 5 */
12 6
13#include "common.h" 7#include "common.h"
14 8
15const uint8_t MAC_BCAST_ADDR[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 9const uint8_t MAC_BCAST_ADDR[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
16
17void udhcp_make_pidfile(const char *pidfile)
18{
19 /* Make sure fd 0,1,2 are open */
20 bb_sanitize_stdio();
21
22 /* Equivalent of doing a fflush after every \n */
23 setlinebuf(stdout);
24
25 /* Create pidfile */
26 if (pidfile && !write_pidfile(pidfile))
27 bb_perror_msg("cannot create pidfile %s", pidfile);
28
29 bb_info_msg("%s (v%s) started", applet_name, BB_VER);
30}