diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:44:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:44:44 +0200 |
commit | b18f5bf2db0fba2e7e539f68645836036d940d26 (patch) | |
tree | 23c4dd8f3d273f34ef9bbe1799d1958685559915 /util/ipmi_sample_evt.c | |
parent | a7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (diff) |
Imported Upstream version 2.9.6upstream/2.9.6
Diffstat (limited to 'util/ipmi_sample_evt.c')
-rw-r--r-- | util/ipmi_sample_evt.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/util/ipmi_sample_evt.c b/util/ipmi_sample_evt.c index b51ba24..f0f8e97 100644 --- a/util/ipmi_sample_evt.c +++ b/util/ipmi_sample_evt.c @@ -321,14 +321,14 @@ main(int argc, char **argv) uchar event[32]; /*usu 16 bytes */ char outbuf[160]; char *s1; - int rlen; + int i, rlen; uchar ccode; uchar sensor_type; fdout = stderr; printf("%s ver %s\n", progname,progver); - while ( (c = getopt( argc, argv,"m:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF ) + while ( (c = getopt( argc, argv,"m:p:s:t:xEF:N:P:R:T:U:V:YZ:?")) != EOF ) switch(c) { case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */ g_bus = htoi(&optarg[0]); /*bus/channel*/ @@ -346,6 +346,7 @@ main(int argc, char **argv) case 's': sdrfile = optarg; break; case 't': mytag = optarg; break; /* specific sensor tag */ case 'x': fdebug = 1; break; /* debug messages */ + case 'p': /* port */ case 'N': /* nodename */ case 'U': /* remote username */ case 'P': /* remote password */ @@ -364,7 +365,7 @@ main(int argc, char **argv) printf(" -m002000 specific MC (bus 00,sa 20,lun 00)\n"); printf(" -s File loads SDRs from File\n"); printf(" -t tag search for 'tag' in SDRs\n"); - print_lan_opt_usage(); + print_lan_opt_usage(1); exit(1); } /* Rather than parse_lan_options above, the set_lan_options function @@ -411,12 +412,13 @@ main(int argc, char **argv) ievt_siginit(); finit_ok = 1; ret = 0; /*ignore any earlier errors, keep going*/ + i = 0; while (ret == 0) { /*wait for bmc message events*/ if (fdebug) - msgout("%s: Polling every %d sec for a new event after id %x...\n", - progname, wait_interval, sel_recid); + msgout("%s: %d Polling every %d sec for a new event after id %x\n", + progname, i, wait_interval, sel_recid); rlen = sizeof(event); ret = getevent_sel(event,&rlen,&ccode); if (ret == 0) ret = ccode; @@ -433,6 +435,7 @@ main(int argc, char **argv) msgout("get_event error: ret = 0x%x\n",ret); break; } + i++; os_usleep(wait_interval,0); } /*end while loop*/ |