diff options
author | Andrew Patterson <andrew.patterson@hp.com> | 2010-03-10 16:01:01 +0800 |
---|---|---|
committer | Huang Ying <ying.huang@intel.com> | 2010-03-10 16:01:01 +0800 |
commit | 2e98a2b5fd65b51144337a595e3c731507633f43 (patch) | |
tree | fb91b2f70b743238eea2eff15786852c58c84fa0 | |
parent | 2a78abc1c40e7d5a57e34bfd5ff6a841757b42cf (diff) | |
download | aer-inject-2e98a2b5fd65b51144337a595e3c731507633f43.tar.gz |
aer-inject: use aliases for various keywords
Introduce aliases for some of the longer-length keywords:
PCI_ID = ID
COR_STATUS = COR = CORRECTABLE
UNCOR_STATUS = UNCOR = UNCORRECTABLE
HEADER_LOG = HL
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
-rw-r--r-- | SPEC | 9 | ||||
-rw-r--r-- | aer.lex | 7 |
2 files changed, 16 insertions, 0 deletions
@@ -67,3 +67,12 @@ For all missing fields reasonable default values are filled in (hopefully). Comments start with # until the end of the line. + +Keywords are case-insensitive. + +There are aliases for some of the longer keywords: + + PCI_ID = ID + COR_STATUS = COR = CORRECTABLE + UNCOR_STATUS = UNCOR = UNCORRECTABLE + HEADER_LOG = HL @@ -54,6 +54,7 @@ static struct key { int32_t val; } keys[] = { #define KEY(x) { #x, x } +#define ALIAS(x, y) { #x, y } #define KEYVAL(x,v) { #x, x, v } KEY(AER), KEY(DOMAIN), @@ -61,9 +62,15 @@ static struct key { KEY(DEV), KEY(FN), KEY(PCI_ID), + ALIAS(ID, PCI_ID), KEY(UNCOR_STATUS), + ALIAS(UNCOR, UNCOR_STATUS), + ALIAS(UNCORRECTABLE, UNCOR_STATUS), KEY(COR_STATUS), + ALIAS(COR, COR_STATUS), + ALIAS(CORRECTABLE, COR_STATUS), KEY(HEADER_LOG), + ALIAS(HL, HEADER_LOG), KEYVAL(TRAIN,PCI_ERR_UNC_TRAIN), KEYVAL(DLP, PCI_ERR_UNC_DLP), KEYVAL(POISON_TLP, PCI_ERR_UNC_POISON_TLP), |