summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/common/xmltohb/xmltohb.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/targeting/common/xmltohb/xmltohb.pl')
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/xmltohb.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl
index 0ca61f5e9..483df2083 100755
--- a/src/usr/targeting/common/xmltohb/xmltohb.pl
+++ b/src/usr/targeting/common/xmltohb/xmltohb.pl
@@ -249,6 +249,33 @@ else
handleTgtPtrAttributesHb(\$attributes, \%Target_t);
}
+# Output R/W attributes
+my $rwAttrOutputDir = "";
+if (!($cfgSrcOutputDir =~ "none"))
+{
+ $rwAttrOutputDir = $cfgSrcOutputDir;
+}
+open(my $rwAttrFile, ">$rwAttrOutputDir"."PersistRwAttrList.csv")
+ or croak("R/W data file 'PersistRwAttrList.csv' could not be opened.");
+
+print $rwAttrFile "# PersistRwAttrList.csv\n"
+. "# This file is generated by perl script xmltohb.pl\n"
+. "# It lists all non-volatile read/write attributes that persist in PNOR\n"
+. "# and can be manipulated at will.\n";
+
+foreach my $attrs (@{$attributes->{attribute}})
+{
+ if (exists $attrs->{readable} &&
+ exists $attrs->{writeable} &&
+ exists $attrs->{persistency} &&
+ $attrs->{persistency} eq "non-volatile")
+ {
+ print $rwAttrFile "$attrs->{id}\n";
+ }
+
+}
+close $rwAttrFile;
+
# Open the output files and write them
if( !($cfgSrcOutputDir =~ "none") )
{
OpenPOWER on IntegriCloud