IPMI Parser Script Updates

This commit adds a new option to the IPMI MRW
parsing scripts (--skip-broken-mrw).

When specified, the option will cause the scripts
to ignore broken MRW targets such as IPMI sensor
targets without a valid SENSOR_ID attribute
or a FRU without a valid FRU_ID.

This allows us to pull in an in-progress MRW without
it breaking our builds.

Tested:
I tested the scripts against an incomplete MRW and made
sure that the scripts ignored broken targets and generated
output config files for whatever targets were valid.

Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: Ibf2ca3769e6030d62e73fb362d73a775433273bc
diff --git a/gen_ipmi_sel.pl b/gen_ipmi_sel.pl
index 30efb0d..bb70a7f 100755
--- a/gen_ipmi_sel.pl
+++ b/gen_ipmi_sel.pl
@@ -13,12 +13,14 @@
 my $debug          = 0;
 my $outputFile     = "";
 my $metaDataFile   = "";
+my $skipBrokenMrw  = 0;
 
 # Command line argument parsing
 GetOptions(
 "i=s" => \$serverwizFile,    # string
 "m=s" => \$metaDataFile,     # string
 "o=s" => \$outputFile,       # string
+"skip-broken-mrw" => \$skipBrokenMrw,
 "d"   => \$debug,
 )
 or printUsage();
@@ -74,6 +76,7 @@
         #Instance path then die
 
         if ($sensorID eq '' or $eventReadingType eq '' or $path eq '') {
+            next if $skipBrokenMrw;
             close $fh;
             die("sensor without info for target=$target");
         }
@@ -118,6 +121,7 @@
     $0 -i [MRW filename] -m [SensorMetaData filename] -o [Output filename] [OPTIONS]
 Options:
     -d = debug mode
+    --skip-broken-mrw = Skip broken MRW targets
         \n";
     exit(1);
 }