diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 0ca61f5e95b..483df2083f9 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -249,6 +249,33 @@ 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") ) {