diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:44 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:44 +0100 |
commit | 7551a684bcbc7de7ac3d2e52eea0f9f812affd18 (patch) | |
tree | 469d3c40a1c88fcb3ec208a820f7a0fa93dca81c /util/ipmicmd.c | |
parent | c71717661b7ee871e5bc957f314ad8779e85abc6 (diff) | |
parent | ee6c7128ed0d58cb1812049463a13bba9cfb31b7 (diff) |
Merge tag 'upstream/2.9.7'
Upstream version 2.9.7
Diffstat (limited to 'util/ipmicmd.c')
-rw-r--r-- | util/ipmicmd.c | 48 |
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", |