mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-06-03 20:51:36 +00:00
Add support for command-specific completion codes
Some commands may return command-specific completion codes. Now they are all reported as 'Unknown'. Add helper functions to support such command-specific codes. Command handlers will need to define their own valstr arrays with completion code descriptions and then use specific_val2str() instead of generic val2str() to convert the completion code into a string. Also reduce code duplication in helper.c Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
This commit is contained in:
committed by
Alexander Amelkin
parent
c9510635d7
commit
73d6af5782
@@ -80,6 +80,10 @@ struct oemvalstr {
|
||||
const char * str;
|
||||
};
|
||||
|
||||
const char *
|
||||
specific_val2str(uint16_t val,
|
||||
const struct valstr *specific,
|
||||
const struct valstr *generic);
|
||||
const char * val2str(uint16_t val, const struct valstr * vs);
|
||||
const char * oemval2str(uint32_t oem,uint16_t val, const struct oemvalstr * vs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user