diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-15 21:18:10 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-15 21:18:10 +0000 |
commit | 395aa87c41b3fba9eccf8c863f21c8426def2207 (patch) | |
tree | bb10a7f48a1d923114b0557d430e9e24d3bc002d /xpp/astribank_usb.h | |
parent | 73edcb7f003ec004c929e7ac9fdbfcdad6881707 (diff) |
xpp: echo_loader.c: add AB id to messages
* Define new macros AB_INFO(), AB_ERR() that prefix their message
with the astribank information (usb device + serial number)
* Replace all INFO()/ERR() messages in echo_loader.c with the new macros
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10498
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10509 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/astribank_usb.h')
-rw-r--r-- | xpp/astribank_usb.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xpp/astribank_usb.h b/xpp/astribank_usb.h index b65c1db..69778e6 100644 --- a/xpp/astribank_usb.h +++ b/xpp/astribank_usb.h @@ -98,4 +98,16 @@ int eeprom_fill(struct eeprom_table *eprm, int astribank_has_twinstar(struct astribank_device *astribank); int label_isvalid(const char *label); +#define AB_REPORT(report_type, astribank, fmt, ...) \ + report_type("%s [%s]: " fmt, \ + xusb_devpath((astribank)->xusb), \ + xusb_serial((astribank)->xusb), \ + ## __VA_ARGS__) + +#define AB_INFO(astribank, fmt, ...) \ + AB_REPORT(INFO, astribank, fmt, ## __VA_ARGS__) + +#define AB_ERR(astribank, fmt, ...) \ + AB_REPORT(ERR, astribank, fmt, ## __VA_ARGS__) + #endif /* ASTRIBANK_USB_H */ |