diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:41 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-11-06 01:42:41 +0100 |
commit | ee6c7128ed0d58cb1812049463a13bba9cfb31b7 (patch) | |
tree | 39b80b4d29c70262a7a6f3443e4acb6bd592b287 /util/ipmicmd.c | |
parent | b18f5bf2db0fba2e7e539f68645836036d940d26 (diff) |
Imported Upstream version 2.9.7upstream/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", |