summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd
diff options
context:
space:
mode:
authorRobert Lippert <rlippert@google.com>2017-11-15 14:28:37 -0800
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-11-21 18:04:38 -0500
commit013f189c0215b9ae998503d3beea16bb27a3bafc (patch)
tree73b01e6050cc6b5871270a16a6990f09724ed456 /src/usr/vpd
parentebd63e0fbdad370377b4ba8f716b8bd7c426f72a (diff)
downloadtalos-hostboot-013f189c0215b9ae998503d3beea16bb27a3bafc.tar.gz
talos-hostboot-013f189c0215b9ae998503d3beea16bb27a3bafc.zip
vpd: add ability to read record RT keyword value
In the existing code the Record Type (RT) keyword value is treated as special and not readable. But I don't see any reason it shouldn't be readable like all of the other keywords in a record. Resolves #124 Signed-off-by: Robert Lippert <rlippert@google.com> Change-Id: I927c85be957f32cf8535c08595fefed156b8027c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49768 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vpd')
-rw-r--r--src/usr/vpd/ipvpd.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C
index 53a1ae552..7c28f5d80 100644
--- a/src/usr/vpd/ipvpd.C
+++ b/src/usr/vpd/ipvpd.C
@@ -1786,6 +1786,20 @@ errlHndl_t IpVpdFacade::findKeywordAddr ( const char * i_keywordName,
record,
i_target,
i_args.location );
+
+ // If we were looking for the Record Type (RT) keyword, we are done.
+ if (memcmp( i_keywordName, "RT", KEYWORD_BYTE_SIZE ) == 0) {
+ // send back the relevant data
+ o_keywordSize = RECORD_BYTE_SIZE;
+ o_byteAddr = offset - i_offset; //make address relative
+
+ // found our match, break out
+ matchesFound++;
+ if ( matchesFound == i_index + 1 ) {
+ break;
+ }
+ }
+
offset += RECORD_BYTE_SIZE;
if( err )
OpenPOWER on IntegriCloud