[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

@@ -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 {