diff options
author | Rob Landley <rob@landley.net> | 2006-05-28 01:06:36 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-05-28 01:06:36 +0000 |
commit | 3f78561d63290c53ca8bb3cd6314ca7357a617ee (patch) | |
tree | 03b3973eeaee9635c77c21028133374d66f2aa18 /networking/udhcp/common.c | |
parent | 8fba99f35e46d234b47d652225bb80846cae369c (diff) | |
download | busybox-w32-3f78561d63290c53ca8bb3cd6314ca7357a617ee.tar.gz busybox-w32-3f78561d63290c53ca8bb3cd6314ca7357a617ee.tar.bz2 busybox-w32-3f78561d63290c53ca8bb3cd6314ca7357a617ee.zip |
My first bout of untangling udhcp. Make lots of gratuitous #defines go
away, substitutie BB_VER for an external VERSION, use busybox CONFIG symbols
rather than checking for them then defining others, etc. Lots more cleanup
to do...
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r-- | networking/udhcp/common.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 589214bce..2c902fc01 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -50,7 +50,7 @@ static inline void sanitize_fds(void) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | void background(const char *pidfile) | 53 | void udhcp_background(const char *pidfile) |
54 | { | 54 | { |
55 | #ifdef __uClinux__ | 55 | #ifdef __uClinux__ |
56 | LOG(LOG_ERR, "Cannot background in uclinux (yet)"); | 56 | LOG(LOG_ERR, "Cannot background in uclinux (yet)"); |
@@ -69,7 +69,7 @@ void background(const char *pidfile) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | #ifdef UDHCP_SYSLOG | 72 | #ifdef CONFIG_FEATURE_UDHCP_SYSLOG |
73 | 73 | ||
74 | void udhcp_logging(int level, const char *fmt, ...) | 74 | void udhcp_logging(int level, const char *fmt, ...) |
75 | { | 75 | { |
@@ -115,7 +115,7 @@ void udhcp_logging(int level, const char *fmt, ...) | |||
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | 117 | ||
118 | void start_log_and_pid(const char *client_server, const char *pidfile) | 118 | void udhcp_start_log_and_pid(const char *client_server, const char *pidfile) |
119 | { | 119 | { |
120 | int pid_fd; | 120 | int pid_fd; |
121 | 121 | ||
@@ -129,9 +129,8 @@ void start_log_and_pid(const char *client_server, const char *pidfile) | |||
129 | /* equivelent of doing a fflush after every \n */ | 129 | /* equivelent of doing a fflush after every \n */ |
130 | setlinebuf(stdout); | 130 | setlinebuf(stdout); |
131 | 131 | ||
132 | #ifdef UDHCP_SYSLOG | 132 | if (ENABLE_FEATURE_UDHCP_SYSLOG) |
133 | openlog(client_server, LOG_PID | LOG_CONS, LOG_LOCAL0); | 133 | openlog(client_server, LOG_PID | LOG_CONS, LOG_LOCAL0); |
134 | #endif | ||
135 | 134 | ||
136 | udhcp_logging(LOG_INFO, "%s (v%s) started", client_server, VERSION); | 135 | udhcp_logging(LOG_INFO, "%s (v%s) started", client_server, BB_VER); |
137 | } | 136 | } |