Skip to content

Commit

Permalink
Fix VPD record size calculation
Browse files Browse the repository at this point in the history
  Algorithm was not including the 2 byte size field as part of
  the full record length, resulting in shortened data being
  returned.

Change-Id: I49a934a24771245fc7b808a2986da622b4aac4a5
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35799
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>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sannerd authored and dcrowell77 committed Feb 3, 2017
1 parent b8da450 commit 47278f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/usr/vpd/ipvpd.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2016 */
/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
Expand Down Expand Up @@ -1533,6 +1533,7 @@ errlHndl_t IpVpdFacade::retrieveRecord( const char * i_recordName,

//byteswap
l_size = le16toh(l_size);
l_size += 2; // include the 2 byte size field in total record

// If the buffer is NULL, return the keyword size in io_buflen
if( NULL == io_buffer )
Expand Down

0 comments on commit 47278f0

Please sign in to comment.