summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-03-29 09:55:58 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-03-29 12:27:02 -0500
commit9142da4b410e6c34aca3ef8a8e84b13d39a9c00d (patch)
treeb62cd45178e384ac1d226e5741c77464f5905131
parent902c85375105db9f73353f510b4a6e2651d65c9e (diff)
downloadphosphor-mrw-tools-9142da4b410e6c34aca3ef8a8e84b13d39a9c00d.tar.gz
phosphor-mrw-tools-9142da4b410e6c34aca3ef8a8e84b13d39a9c00d.zip
hwmon.pl: Pass in base directory
The script needs to be told which directory to create its output files in. Change-Id: I1cb34ef6d5492ec06998b957f26f62f425e00b7a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rwxr-xr-xhwmon.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/hwmon.pl b/hwmon.pl
index 46f7b73..b784997 100755
--- a/hwmon.pl
+++ b/hwmon.pl
@@ -19,9 +19,11 @@ use constant {
};
my $serverwizFile;
+my $g_outputDir;
my @hwmon;
-GetOptions("x=s" => \$serverwizFile) or printUsage();
+GetOptions("x=s" => \$serverwizFile,
+ "d=s" => \$g_outputDir) or printUsage();
if (not defined $serverwizFile) {
printUsage();
@@ -270,7 +272,7 @@ sub getAspeedConfFilePath
"in the I2C master unit XML\n";
}
- $path = "ahb/apb/i2c\@$entry->{regBaseAddress}/i2c-bus@" .
+ $path = "$g_outputDir/ahb/apb/i2c\@$entry->{regBaseAddress}/i2c-bus@" .
"$entry->{regOffset}";
}
else {
@@ -293,6 +295,6 @@ sub getConfFileName
sub printUsage
{
- print "$0 -x [XML filename]\n";
+ print "$0 -x [XML filename] -d [output base directory]\n";
exit(1);
}
OpenPOWER on IntegriCloud