XilinxProcessorIPLib/drivers/dp14txss/examples/src/key/keymgmt_loader.c
static KEYMGMT_tError
doLoadTable(
  tHandler*        theHandler,
  KEYMGMT_tTableID theTableID,
  const uint64_t*  theBuf,
  int              theBufSize
)
{
  /* Locals */
  KEYMGMT_tError theError = KEYMGMT_ERROR_NONE;

  /* Load it */
  if (KEYMGMTDEV_Load(theHandler->fDevID, theTableID, theBuf, theBufSize)
		  == KEYMGMT_ERROR_NONE)
  {
    /* Verify it */
    if (KEYMGMTDEV_Verify(theHandler->fDevID, theTableID, theBuf, theBufSize)
		!= KEYMGMT_ERROR_NONE)
    {
      /* Update theError */
      theError = -2;
    }
  }
  /* Otherwise */
  else
  {
    /* Update theError */
    theError = -1;
  }

  /* Return */
  return (theError);
}
/*****************************************************************************/
/**
*
* This function loads a specific table of a handler
*
* @param theHandler  the handler to load the table of
* @param theTableID  the table to load
* @param theBuf      the buffer of data to load
* @param theBufSize  the size of the buffer (in bytes)
*
* @return
*   KEYMGMT_ERROR_NONE if successful.
*
* @note
*   None.
*
******************************************************************************/
This function loads a specific table of a handler
This function loads a specific table of a handler
static KEYMGMT_tError
doLoadTable(
  tHandler*        theHandler,
  KEYMGMT_tTableID theTableID,
  const uint64_t*  theBuf,
  int              theBufSize
)
{
  KEYMGMT_tError theError = KEYMGMT_ERROR_NONE;
  if (KEYMGMTDEV_Load(theHandler->fDevID, theTableID, theBuf, theBufSize)
		  == KEYMGMT_ERROR_NONE)
  {
    if (KEYMGMTDEV_Verify(theHandler->fDevID, theTableID, theBuf, theBufSize)
		!= KEYMGMT_ERROR_NONE)
    {
      theError = -2;
    }
  }
  else
  {
    theError = -1;
  }
  return (theError);
}
static KEYMGMT_tError doLoadTable ( tHandler * theHandler , KEYMGMT_tTableID theTableID , const uint64_t * theBuf , int theBufSize ) { KEYMGMT_tError theError = KEYMGMT_ERROR_NONE ; if ( KEYMGMTDEV_Load ( theHandler -> fDevID , theTableID , theBuf , theBufSize ) == KEYMGMT_ERROR_NONE ) { if ( KEYMGMTDEV_Verify ( theHandler -> fDevID , theTableID , theBuf , theBufSize ) != KEYMGMT_ERROR_NONE ) { theError = -2 ; } } else { theError = -1 ; } return ( theError ) ; }
This function loads a specific table of a handler
This function loads a specific table of a handler
/* Locals */ /* Load it */ /* Verify it */ /* Update theError */ /* Otherwise */ /* Update theError */ /* Return */