From 6c0e8c14be9546b49c097f5e6e8307bda3e7f5ac Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 30 May 2010 15:29:05 +0100 Subject: [libc] Enable automated extraction of error usage reports Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown --- src/net/infiniband/ib_srp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/net/infiniband') diff --git a/src/net/infiniband/ib_srp.c b/src/net/infiniband/ib_srp.c index f4ec544c8..ef0078d43 100644 --- a/src/net/infiniband/ib_srp.c +++ b/src/net/infiniband/ib_srp.c @@ -46,10 +46,15 @@ FILE_LICENCE ( BSD2 ); */ /* Disambiguate the various possible EINVALs */ -#define EINVAL_BYTE_STRING_LEN ( EINVAL | EUNIQ_01 ) -#define EINVAL_BYTE_STRING ( EINVAL | EUNIQ_02 ) -#define EINVAL_INTEGER ( EINVAL | EUNIQ_03 ) -#define EINVAL_RP_TOO_SHORT ( EINVAL | EUNIQ_04 ) +#define EINVAL_BYTE_STRING_LEN __einfo_error ( EINFO_EINVAL_BYTE_STRING_LEN ) +#define EINFO_EINVAL_BYTE_STRING_LEN __einfo_uniqify \ + ( EINFO_EINVAL, 0x01, "Invalid byte string length" ) +#define EINVAL_INTEGER __einfo_error ( EINFO_EINVAL_INTEGER ) +#define EINFO_EINVAL_INTEGER __einfo_uniqify \ + ( EINFO_EINVAL, 0x03, "Invalid integer" ) +#define EINVAL_RP_TOO_SHORT __einfo_error ( EINFO_EINVAL_RP_TOO_SHORT ) +#define EINFO_EINVAL_RP_TOO_SHORT __einfo_uniqify \ + ( EINFO_EINVAL, 0x04, "Root path too short" ) /** IB SRP parse flags */ enum ib_srp_parse_flags { -- cgit v1.2.3-55-g7522