From 6e4a63bdfe94bf2efbfd1be631a1c1387d55b171 Mon Sep 17 00:00:00 2001 From: Francois Isabelle Date: Fri, 14 Dec 2007 20:56:53 +0000 Subject: [PATCH] fixed type for oemval2str (shouldn't be 16 bits for a 24 bits iana ..) --- ipmitool/include/ipmitool/helper.h | 2 +- ipmitool/lib/helper.c | 4 ++-- ipmitool/lib/ipmi_mc.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ipmitool/include/ipmitool/helper.h b/ipmitool/include/ipmitool/helper.h index 61bbed6..031da22 100644 --- a/ipmitool/include/ipmitool/helper.h +++ b/ipmitool/include/ipmitool/helper.h @@ -63,7 +63,7 @@ struct oemvalstr { }; const char * val2str(uint16_t val, const struct valstr * vs); -const char * oemval2str(uint16_t oem,uint16_t val, const struct oemvalstr * vs); +const char * oemval2str(uint32_t oem,uint16_t val, const struct oemvalstr * vs); uint16_t str2val(const char * str, const struct valstr * vs); void print_valstr(const struct valstr * vs, const char * title, int loglevel); void print_valstr_2col(const struct valstr * vs, const char * title, int loglevel); diff --git a/ipmitool/lib/helper.c b/ipmitool/lib/helper.c index 86823df..3109dfe 100644 --- a/ipmitool/lib/helper.c +++ b/ipmitool/lib/helper.c @@ -123,8 +123,8 @@ const char * val2str(uint16_t val, const struct valstr *vs) return un_str; } - -const char * oemval2str(uint16_t oem, uint16_t val, + +const char * oemval2str(uint32_t oem, uint16_t val, const struct oemvalstr *vs) { static char un_str[32]; diff --git a/ipmitool/lib/ipmi_mc.c b/ipmitool/lib/ipmi_mc.c index 2bfe9c5..41d6513 100644 --- a/ipmitool/lib/ipmi_mc.c +++ b/ipmitool/lib/ipmi_mc.c @@ -315,7 +315,7 @@ ipmi_mc_get_deviceid(struct ipmi_intf * intf) struct ipmi_rq req; struct ipm_devid_rsp *devid; int i; - char *product=NULL; + const char *product=NULL; memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_APP; @@ -353,7 +353,7 @@ ipmi_mc_get_deviceid(struct ipmi_intf * intf) printf("Product ID : %u (0x%02x%02x)\n", buf2short((uint8_t *)(devid->product_id)), devid->product_id[1], devid->product_id[0]); - + product=oemval2str(IPM_DEV_MANUFACTURER_ID(devid->manufacturer_id), (devid->product_id[1]<<8)+devid->product_id[0], ipmi_oem_product_info);