[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-05-30 15:29:05 +01:00
parent d2415be069
commit 6c0e8c14be
22 changed files with 1499 additions and 391 deletions

View File

@@ -50,13 +50,17 @@ struct list_head ib_devices = LIST_HEAD_INIT ( ib_devices );
static struct list_head open_ib_devices = LIST_HEAD_INIT ( open_ib_devices );
/* Disambiguate the various possible EINPROGRESSes */
#define EINPROGRESS_INIT ( EINPROGRESS | EUNIQ_01 )
#define EINPROGRESS_ARMED ( EINPROGRESS | EUNIQ_02 )
#define EINPROGRESS_INIT __einfo_error ( EINFO_EINPROGRESS_INIT )
#define EINFO_EINPROGRESS_INIT __einfo_uniqify \
( EINFO_EINPROGRESS, 0x01, "Initialising" )
#define EINPROGRESS_ARMED __einfo_error ( EINFO_EINPROGRESS_ARMED )
#define EINFO_EINPROGRESS_ARMED __einfo_uniqify \
( EINFO_EINPROGRESS, 0x02, "Armed" )
/** Human-readable message for the link statuses */
struct errortab infiniband_errors[] __errortab = {
{ EINPROGRESS_INIT, "Initialising" },
{ EINPROGRESS_ARMED, "Armed" },
__einfo_errortab ( EINFO_EINPROGRESS_INIT ),
__einfo_errortab ( EINFO_EINPROGRESS_ARMED ),
};
/***************************************************************************