diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 10:13:09 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 10:13:09 +0200 |
commit | fc806628dbeecd34f41b2f6d04290631dca3955e (patch) | |
tree | e9ee96c4b97b1ca9b9f100eae402185859f6539b /util/isel.c | |
parent | d5cdf594f2678cf690b802fbf4eb687dd9d98c4f (diff) |
New upstream version 3.1.0upstream/3.1.0
Diffstat (limited to 'util/isel.c')
-rw-r--r-- | util/isel.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/util/isel.c b/util/isel.c index ede4d52..63a1d42 100644 --- a/util/isel.c +++ b/util/isel.c @@ -161,8 +161,13 @@ typedef struct #define RET_OFFSET 12 //byte offset to the record event trigger #define RDATA_OFFSET 13 //byte offset to the record event data -static char *progname = "isel"; -static char *progver = "3.08"; +#ifdef METACOMMAND +extern char * progver; /*from ipmiutil.c*/ +static char * progname = "ipmiutil sel"; +#else +static char * progver = "3.08"; +static char * progname = "isel"; +#endif #ifdef WIN32 #define IDXFILE "sel.idx" static char idxfile[80] = IDXFILE; @@ -649,9 +654,10 @@ int i_sel(int argc, char **argv) char DevRecord[16]; int c; char *s1; + char *vend_param = NULL; - printf("%s: version %s\n",progname,progver); - while ((c = getopt(argc,argv,"a:b:cdef:h:i:l:m:np:rs:uwvxT:V:J:EYF:P:N:U:R:Z:?")) != EOF) + printf("%s version %s\n",progname,progver); + while ((c = getopt(argc,argv,"a:b:cdef:h:i:l:m:np:rs:uwvxM:T:V:J:EYF:P:N:U:R:Z:?")) != EOF) switch(c) { case 'a': faddsel = 1; /*undocumented option, to prevent misuse*/ addstr = optarg; /*text string, max 13 bytes, no date*/ @@ -696,6 +702,8 @@ int i_sel(int argc, char **argv) case 'v': fonlyver = 1; break; case 'w': fwritesel = 1; break; case 'x': fdebug = 1; break; + case 'M': /* Manufacturing VendorId */ + vend_param = optarg; break; case 'p': /* port */ case 'N': /* nodename */ case 'U': /* remote username */ @@ -857,12 +865,13 @@ int i_sel(int argc, char **argv) prod_id = DevRecord[9] + (DevRecord[10] << 8); vend_id = DevRecord[6] + (DevRecord[7] << 8) + (DevRecord[8] << 16); if (vend_id == VENDOR_INTEL) { - if (prod_id == 0x003E) /*Urbanna NSN2U or CG2100*/ + if (prod_id == 0x003E) /*Urbanna NSN2U or CG2100*/ set_max_kcs_loops(URNLOOPS); /*longer KCS timeout*/ } } else { goto do_exit; } + if (vend_param != NULL) set_iana(atoi(vend_param)); ret = ReadSELinfo(); if (ret == 0 && !fonlyver) { |