diff options
Diffstat (limited to 'src/usr/targeting/common')
-rwxr-xr-x | src/usr/targeting/common/genHwsvMrwXml.pl | 2 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 3 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 22 |
3 files changed, 24 insertions, 3 deletions
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl index fd07be2e8..587e76136 100755 --- a/src/usr/targeting/common/genHwsvMrwXml.pl +++ b/src/usr/targeting/common/genHwsvMrwXml.pl @@ -2935,7 +2935,7 @@ sub generate_capp <id>MRU_ID</id>"; # TODO RTC: 97477 print " - <default>TO_BE_ADDED</default> + <default>0</default> </attribute> <attribute> <id>AFFINITY_PATH</id> diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index dd0411228..780c9419f 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -12762,14 +12762,13 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript <default>NOT_MASTER</default> </enumerationType> -<!-- TODO RTC 91689 Support enum in default --> <attribute> <id>PROC_MASTER_TYPE</id> <description>Type of Master, ACTING_MASTER or MASTER_CANDIDATE or NOT_MASTER</description> <simpleType> <uint8_t> - <default>2</default> + <default>NOT_MASTER</default> </uint8_t> </simpleType> <persistency>non-volatile</persistency> diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 695ade7f5..843bdd0eb 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -4517,6 +4517,28 @@ sub packSingleSimpleTypeAttribute { $simpleTypeProperties->{$typeName}{specialPolicies}->($$attributeRef, $value); + if ($value eq 'true') + { + $value = 1; + } + elsif ($value eq 'false') + { + $value = 0; + } + + if( ($simpleTypeProperties->{$typeName}{complexTypeSupport}) && + ($value =~ m/[^0-9]/) ) + { + # This is a type that supports complex types - i.e. an integer and + # the value is a string. Look for an enumeration named after the + # attribute id, if one is not found then one of the function calls + # below will exit with error + my $enumeration = getEnumerationType($$attributesRef, + $$attributeRef->{id}); + + $value = enumNameToValue($enumeration, $value); + } + if(ref ($simpleTypeProperties->{$typeName}{packfmt}) eq "CODE") { $$binaryDataRef .= $simpleTypeProperties->{$typeName}{packfmt}-> |