summaryrefslogtreecommitdiff
path: root/networking/udhcp/static_leases.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-17 13:44:04 +0200
committerDenys Vlasenko2009-06-17 13:44:04 +0200
commit799d00e84c0328fead9b68ac33dc7dd11b34adb1 (patch)
tree79ec915e750e2d15953ad4443771f81bb2fe8576 /networking/udhcp/static_leases.c
parent6947d2c7e194e3be31eed1c75260e15fca1a2568 (diff)
downloadbusybox-799d00e84c0328fead9b68ac33dc7dd11b34adb1.zip
busybox-799d00e84c0328fead9b68ac33dc7dd11b34adb1.tar.gz
udhcp: convert old-style logging in print_static_leases
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/static_leases.c')
-rw-r--r--networking/udhcp/static_leases.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/networking/udhcp/static_leases.c b/networking/udhcp/static_leases.c
index 7d1aa2f..1887a8a 100644
--- a/networking/udhcp/static_leases.c
+++ b/networking/udhcp/static_leases.c
@@ -57,19 +57,23 @@ int FAST_FUNC is_nip_reserved(struct static_lease *st_lease, uint32_t nip)
return 0;
}
-#if ENABLE_UDHCP_DEBUG
+#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
/* Print out static leases just to check what's going on */
/* Takes the address of the pointer to the static_leases linked list */
-void FAST_FUNC print_static_leases(struct static_lease **st_lease_pp)
+void FAST_FUNC log_static_leases(struct static_lease **st_lease_pp)
{
- struct static_lease *cur = *st_lease_pp;
+ struct static_lease *cur;
+ if (dhcp_verbose < 2)
+ return;
+
+ cur = *st_lease_pp;
while (cur) {
- printf("PrintStaticLeases: lease mac: %02x:%02x:%02x:%02x:%02x:%02x\n",
+ bb_info_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x",
cur->mac[0], cur->mac[1], cur->mac[2],
- cur->mac[3], cur->mac[4], cur->mac[5]
+ cur->mac[3], cur->mac[4], cur->mac[5],
+ cur->nip
);
- printf("PrintStaticLeases: lease ip: %x\n", cur->nip);
cur = cur->next;
}
}