diff options
author | russ <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-16 02:30:53 +0000 |
---|---|---|
committer | russ <russ@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-12-16 02:30:53 +0000 |
commit | 3edddaf1703d26539b51f21a6a94d5c06a3747da (patch) | |
tree | a998a755c5f910484ce292ffe916f59027b89231 | |
parent | 57c9de176b7a8e5972f2e859152449e74931f8a3 (diff) | |
download | busybox-w32-3edddaf1703d26539b51f21a6a94d5c06a3747da.tar.gz busybox-w32-3edddaf1703d26539b51f21a6a94d5c06a3747da.tar.bz2 busybox-w32-3edddaf1703d26539b51f21a6a94d5c06a3747da.zip |
why the complication of a static string rather than a define? gcc isn't dumb
git-svn-id: svn://busybox.net/trunk/busybox@8097 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | networking/udhcp/dhcpd.h | 3 | ||||
-rw-r--r-- | networking/udhcp/dumpleases.c | 2 | ||||
-rw-r--r-- | networking/udhcp/files.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index e219143cc..d53a809ca 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h | |||
@@ -5,7 +5,9 @@ | |||
5 | #include <netinet/ip.h> | 5 | #include <netinet/ip.h> |
6 | #include <netinet/udp.h> | 6 | #include <netinet/udp.h> |
7 | 7 | ||
8 | #include "libbb_udhcp.h" | ||
8 | #include "leases.h" | 9 | #include "leases.h" |
10 | #include "version.h" | ||
9 | 11 | ||
10 | /************************************/ | 12 | /************************************/ |
11 | /* Defaults _you_ may want to tweak */ | 13 | /* Defaults _you_ may want to tweak */ |
@@ -13,6 +15,7 @@ | |||
13 | 15 | ||
14 | /* the period of time the client is allowed to use that address */ | 16 | /* the period of time the client is allowed to use that address */ |
15 | #define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ | 17 | #define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ |
18 | #define LEASES_FILE "/var/lib/misc/udhcpd.leases" | ||
16 | 19 | ||
17 | /* where to find the DHCP server configuration file */ | 20 | /* where to find the DHCP server configuration file */ |
18 | #define DHCPD_CONF_FILE "/etc/udhcpd.conf" | 21 | #define DHCPD_CONF_FILE "/etc/udhcpd.conf" |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index 5cb3a156f..4c1ee131f 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) | |||
43 | FILE *fp; | 43 | FILE *fp; |
44 | int i, c, mode = REMAINING; | 44 | int i, c, mode = REMAINING; |
45 | long expires; | 45 | long expires; |
46 | const char *file = leases_file; | 46 | const char *file = LEASES_FILE; |
47 | struct dhcpOfferedAddr lease; | 47 | struct dhcpOfferedAddr lease; |
48 | struct in_addr addr; | 48 | struct in_addr addr; |
49 | 49 | ||
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 0597dc310..23d8c0094 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c | |||
@@ -167,7 +167,7 @@ static const struct config_keyword keywords[] = { | |||
167 | {"conflict_time",read_u32,&(server_config.conflict_time),"3600"}, | 167 | {"conflict_time",read_u32,&(server_config.conflict_time),"3600"}, |
168 | {"offer_time", read_u32, &(server_config.offer_time), "60"}, | 168 | {"offer_time", read_u32, &(server_config.offer_time), "60"}, |
169 | {"min_lease", read_u32, &(server_config.min_lease), "60"}, | 169 | {"min_lease", read_u32, &(server_config.min_lease), "60"}, |
170 | {"lease_file", read_str, &(server_config.lease_file), leases_file}, | 170 | {"lease_file", read_str, &(server_config.lease_file), LEASES_FILE}, |
171 | {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"}, | 171 | {"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"}, |
172 | {"notify_file", read_str, &(server_config.notify_file), ""}, | 172 | {"notify_file", read_str, &(server_config.notify_file), ""}, |
173 | {"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"}, | 173 | {"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"}, |