summaryrefslogtreecommitdiff
path: root/networking/udhcp/common.c
diff options
context:
space:
mode:
authorRob Landley2006-05-28 01:06:36 +0000
committerRob Landley2006-05-28 01:06:36 +0000
commit3f78561d63290c53ca8bb3cd6314ca7357a617ee (patch)
tree03b3973eeaee9635c77c21028133374d66f2aa18 /networking/udhcp/common.c
parent8fba99f35e46d234b47d652225bb80846cae369c (diff)
downloadbusybox-3f78561d63290c53ca8bb3cd6314ca7357a617ee.zip
busybox-3f78561d63290c53ca8bb3cd6314ca7357a617ee.tar.gz
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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 589214b..2c902fc 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -50,7 +50,7 @@ static inline void sanitize_fds(void)
}
-void background(const char *pidfile)
+void udhcp_background(const char *pidfile)
{
#ifdef __uClinux__
LOG(LOG_ERR, "Cannot background in uclinux (yet)");
@@ -69,7 +69,7 @@ void background(const char *pidfile)
}
-#ifdef UDHCP_SYSLOG
+#ifdef CONFIG_FEATURE_UDHCP_SYSLOG
void udhcp_logging(int level, const char *fmt, ...)
{
@@ -115,7 +115,7 @@ void udhcp_logging(int level, const char *fmt, ...)
#endif
-void start_log_and_pid(const char *client_server, const char *pidfile)
+void udhcp_start_log_and_pid(const char *client_server, const char *pidfile)
{
int pid_fd;
@@ -129,9 +129,8 @@ void start_log_and_pid(const char *client_server, const char *pidfile)
/* equivelent of doing a fflush after every \n */
setlinebuf(stdout);
-#ifdef UDHCP_SYSLOG
- openlog(client_server, LOG_PID | LOG_CONS, LOG_LOCAL0);
-#endif
+ if (ENABLE_FEATURE_UDHCP_SYSLOG)
+ openlog(client_server, LOG_PID | LOG_CONS, LOG_LOCAL0);
- udhcp_logging(LOG_INFO, "%s (v%s) started", client_server, VERSION);
+ udhcp_logging(LOG_INFO, "%s (v%s) started", client_server, BB_VER);
}