summaryrefslogtreecommitdiff
path: root/xpp/astribank_usb.h
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-03-15 21:46:08 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-03-15 21:46:08 +0000
commit227fb9a92a1d3fc09d56cc0115c3f2c121932927 (patch)
tree8533dbf86ec59ca4efb8da032f0f19e7feb4a0b7 /xpp/astribank_usb.h
parent3cc110e856a543f5943c4a7769c35bdd2e96c5d8 (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.6@10519 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/astribank_usb.h')
-rw-r--r--xpp/astribank_usb.h12
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 */