summaryrefslogtreecommitdiff
path: root/util/ipmicmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ipmicmd.c')
-rw-r--r--util/ipmicmd.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/util/ipmicmd.c b/util/ipmicmd.c
index 858d062..d969173 100644
--- a/util/ipmicmd.c
+++ b/util/ipmicmd.c
@@ -460,28 +460,6 @@ static struct {
// { DRV_VA, "va" },
// { DRV_GNU, "free" },
-char *show_driver_type(int idx)
-{
- int i;
- char *tag;
- for (i = 0; i < ndrivers; i++)
- {
- if (drv_types[i].idx == idx) {
- tag = drv_types[i].tag;
- break;
- }
- }
- if (i >= ndrivers) { /*not found*/
- tag = "unknown";
- }
- return(tag);
-}
-
-int get_driver_type(void)
-{
- return(fDriverTyp);
-}
-
void set_iana(int iana)
{
my_devid[6] = (iana & 0x0000ff);
@@ -504,6 +482,28 @@ void get_mfgid(int *pvend, int *pprod)
*pprod = my_devid[9] + (my_devid[10] << 8);
}
+char *show_driver_type(int idx)
+{
+ int i;
+ char *tag;
+ for (i = 0; i < ndrivers; i++)
+ {
+ if (drv_types[i].idx == idx) {
+ tag = drv_types[i].tag;
+ break;
+ }
+ }
+ if (i >= ndrivers) { /*not found*/
+ tag = "unknown";
+ }
+ return(tag);
+}
+
+int get_driver_type(void)
+{
+ return(fDriverTyp);
+}
+
int set_driver_type(char *tag)
{
int rv = 0;
@@ -1048,6 +1048,8 @@ int ipmi_getpicmg(uchar *presp, int sresp, char fdebug)
int ipmi_getdeviceid(uchar *presp, int sresp, char fdebug)
{
int rc, i; uchar cc;
+ char mbstr[80] = "unknown";
+
/* check that sresp is big enough (default is 15 bytes for Langley)*/
if (sresp < 15) return(ERR_BAD_LENGTH);
rc = ipmi_cmd_mc(GET_DEVICE_ID, NULL, 0, presp,&sresp, &cc, fdebug);
@@ -1345,7 +1347,7 @@ void parse_lan_options(int c, char *popt, char fdebugcmd)
switch(c)
{
- case 'p':
+ case 'p':
i = atoi(popt);
if (i > 0) lanp.port = i;
else printf("-p port %d < 0, defaults to %d\n",