diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-15 20:42:10 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2012-03-15 20:42:10 +0000 |
commit | a890cbc803217f497352d6ee5ce97be0a825b389 (patch) | |
tree | 1389197d30370888afdedb7fdf94fcbb9cc91183 /xpp/astribank_usb.h | |
parent | 4d9d86f53b972104be6e4cd5e13d46b4c3216a4e (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>
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10498 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 */ |