diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-03-29 09:55:58 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-03-29 12:27:02 -0500 |
commit | 9142da4b410e6c34aca3ef8a8e84b13d39a9c00d (patch) | |
tree | b62cd45178e384ac1d226e5741c77464f5905131 | |
parent | 902c85375105db9f73353f510b4a6e2651d65c9e (diff) | |
download | phosphor-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-x | hwmon.pl | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); } |