diff options
Diffstat (limited to 'networking/udhcp/static_leases.c')
-rw-r--r-- | networking/udhcp/static_leases.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/networking/udhcp/static_leases.c b/networking/udhcp/static_leases.c index 7d1aa2f27..1887a8afd 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) | |||
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | #if ENABLE_UDHCP_DEBUG | 60 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2 |
61 | /* Print out static leases just to check what's going on */ | 61 | /* Print out static leases just to check what's going on */ |
62 | /* Takes the address of the pointer to the static_leases linked list */ | 62 | /* Takes the address of the pointer to the static_leases linked list */ |
63 | void FAST_FUNC print_static_leases(struct static_lease **st_lease_pp) | 63 | void FAST_FUNC log_static_leases(struct static_lease **st_lease_pp) |
64 | { | 64 | { |
65 | struct static_lease *cur = *st_lease_pp; | 65 | struct static_lease *cur; |
66 | 66 | ||
67 | if (dhcp_verbose < 2) | ||
68 | return; | ||
69 | |||
70 | cur = *st_lease_pp; | ||
67 | while (cur) { | 71 | while (cur) { |
68 | printf("PrintStaticLeases: lease mac: %02x:%02x:%02x:%02x:%02x:%02x\n", | 72 | bb_info_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x", |
69 | cur->mac[0], cur->mac[1], cur->mac[2], | 73 | cur->mac[0], cur->mac[1], cur->mac[2], |
70 | cur->mac[3], cur->mac[4], cur->mac[5] | 74 | cur->mac[3], cur->mac[4], cur->mac[5], |
75 | cur->nip | ||
71 | ); | 76 | ); |
72 | printf("PrintStaticLeases: lease ip: %x\n", cur->nip); | ||
73 | cur = cur->next; | 77 | cur = cur->next; |
74 | } | 78 | } |
75 | } | 79 | } |