From e27e058c6ef0d8e4d058abc145ea88829e994234 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 23 Aug 2013 20:33:01 -0700 Subject: [PATCH] monitor: Add label parameter to address printing function --- monitor/packet.c | 4 ++-- monitor/packet.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monitor/packet.c b/monitor/packet.c index ffe72cff1..aedbff002 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2155,9 +2155,9 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le) packet_hexdump(eir, eir_len - len); } -void packet_print_addr(const void *data, bool random) +void packet_print_addr(const char *label, const void *data, bool random) { - print_addr("Address", data, random ? 0x01 : 0x00); + print_addr(label ? : "Address", data, random ? 0x01 : 0x00); } void packet_print_ad(const void *data, uint8_t size) diff --git a/monitor/packet.h b/monitor/packet.h index 175ec974c..103fdf2e6 100644 --- a/monitor/packet.h +++ b/monitor/packet.h @@ -40,7 +40,7 @@ void packet_del_filter(unsigned long filter); void packet_select_index(uint16_t index); void packet_hexdump(const unsigned char *buf, uint16_t len); -void packet_print_addr(const void *data, bool random); +void packet_print_addr(const char *label, const void *data, bool random); void packet_print_ad(const void *data, uint8_t size); void packet_control(struct timeval *tv, uint16_t index, uint16_t opcode, -- 2.11.0