diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:36:21 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:36:21 +0200 |
commit | 341aee5e3e3625173e4b684cc4166e60f6eb147f (patch) | |
tree | 133bb01bc02539bb98f98bfa6807dc084b995bec /util/isel.c | |
parent | 631fa5250443f5441549bf3184830bc34b0c042e (diff) | |
parent | 788a8d509d66a15ecb1810599885792a1acaaeb9 (diff) |
Merge branch 'release/debian/3.1.1-1'debian/3.1.1-1
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) { |