move enum flg_e enum define to header file and make sure ipmi_pef_print_flags() prototype is correct

This commit is contained in:
Duncan Laurie 2005-01-12 21:13:25 +00:00
parent 2e5d0c2921
commit 58ef4f8af6
2 changed files with 8 additions and 7 deletions

View File

@ -47,6 +47,13 @@ struct pef_capabilities { /* "get pef capabilities" response */
uint8_t tblsize; uint8_t tblsize;
}; };
typedef enum {
P_TRUE,
P_SUPP,
P_ACTV,
P_ABLE,
} flg_e;
struct pef_table_entry { struct pef_table_entry {
#define PEF_CONFIG_ENABLED 0x80 #define PEF_CONFIG_ENABLED 0x80
#define PEF_CONFIG_PRECONFIGURED 0x40 #define PEF_CONFIG_PRECONFIGURED 0x40
@ -769,7 +776,7 @@ BIT_DESC_MAP_LIST,
#define IPMI_CMD_SERIAL_GET_CONFIG 0x11 #define IPMI_CMD_SERIAL_GET_CONFIG 0x11
const char * ipmi_pef_bit_desc(struct bit_desc_map * map, uint32_t val); const char * ipmi_pef_bit_desc(struct bit_desc_map * map, uint32_t val);
void ipmi_pef_print_flags(struct bit_desc_map * map, uint32_t type, uint32_t val); void ipmi_pef_print_flags(struct bit_desc_map * map, flg_e type, uint32_t val);
void ipmi_pef_print_dec(const char * text, uint32_t val); void ipmi_pef_print_dec(const char * text, uint32_t val);
void ipmi_pef_print_hex(const char * text, uint32_t val); void ipmi_pef_print_hex(const char * text, uint32_t val);
void ipmi_pef_print_1xd(const char * text, uint32_t val); void ipmi_pef_print_1xd(const char * text, uint32_t val);

View File

@ -76,12 +76,6 @@ static const char * pef_flag_fmts[][3] = {
{"active", "in", ""}, {"active", "in", ""},
{"abled", "dis", "en"}, {"abled", "dis", "en"},
}; };
typedef enum {
P_TRUE,
P_SUPP,
P_ACTV,
P_ABLE,
} flg_e;
static const char * listitem[] = {" | %s", ",%s", "%s"}; static const char * listitem[] = {" | %s", ",%s", "%s"};
const char * const char *