summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf')
-rwxr-xr-xsrc/usr/hwpf/fapi/fapiParseAttributeInfo.pl4
-rwxr-xr-xsrc/usr/hwpf/hwp/fapiTestHwpAttr.C5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl b/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl
index 2d7051b5e..333e68440 100755
--- a/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl
+++ b/src/usr/hwpf/fapi/fapiParseAttributeInfo.pl
@@ -45,6 +45,8 @@
# mjjones 10/18/11 Support multiple attr files and
# multi-line descriptions
# camvanng 10/20/11 Changed i_pTarget to "const" ptr
+# camvanng 11/09/11 Prepend "ENUM_" to attribute
+# enums
#
# End Change Log ******************************************************
@@ -266,7 +268,7 @@ foreach my $argnum (1 .. $#ARGV)
{
# Remove leading spaces
$val =~ s/^\s+//;
- print AIFILE " $attr->{id}_${val},\n";
+ print AIFILE " ENUM_$attr->{id}_${val},\n";
}
print AIFILE "};\n";
diff --git a/src/usr/hwpf/hwp/fapiTestHwpAttr.C b/src/usr/hwpf/hwp/fapiTestHwpAttr.C
index 1fae73b75..df13107dc 100755
--- a/src/usr/hwpf/hwp/fapiTestHwpAttr.C
+++ b/src/usr/hwpf/hwp/fapiTestHwpAttr.C
@@ -39,6 +39,7 @@
* mjjones 10/17/2011 Update scratch test
* camvanng 10/26/2011 Update scratch test
* mjjones 10/28/2011 Fix error generation
+ * camvanng 11/09/2011 Update attr enum test
*/
#include <fapiTestHwpAttr.H>
@@ -765,7 +766,7 @@ fapi::ReturnCode hwpTestAttributes()
// Test setting and getting an enum value from a scratch attribute
//----------------------------------------------------------------------
{
- uint64_t l_uint64 = fapi::ATTR_SCRATCH_UINT64_2_VAL_C;
+ uint64_t l_uint64 = fapi::ENUM_ATTR_SCRATCH_UINT64_2_VAL_C;
// Test set
l_rc = FAPI_ATTR_SET(ATTR_SCRATCH_UINT64_2, NULL, l_uint64);
@@ -785,7 +786,7 @@ fapi::ReturnCode hwpTestAttributes()
}
// Check value
- if (l_uint64 != fapi::ATTR_SCRATCH_UINT64_2_VAL_C)
+ if (l_uint64 != fapi::ENUM_ATTR_SCRATCH_UINT64_2_VAL_C)
{
FAPI_SET_HWP_ERROR(l_rc, RC_HWP_ATTR_UNIT_TEST_FAIL);
FAPI_ERR("hwpTestAttributes: ATTR_SCRATCH_UINT64_2. GET returned %d (enum)",
OpenPOWER on IntegriCloud