ta/wallet_ta.c
/**
  * Wrapper of flush_wallet_storage_internal() for a CA command.
  * \param session_data A data pointer to a session context.
  * \param param_types The types of the four parameters.
  * \param params A pointer to an array of four parameters.
  * \return TEE_SUCCESS in case of success otherwise returns the result
  *         received from the failed operation. The information about all
  *         possible returns is present in TEE Client API Specification - 4.4.2
  *         published by GlobalPlatform.
  */
Wrapper of flush_wallet_storage_internal() for a CA command.
\param session_data A data pointer to a session context.
\param param_types The types of the four parameters.
\param params A pointer to an array of four parameters.
\return TEE_SUCCESS in case of success otherwise returns the result
received from the failed operation. The information about all
possible returns is present in TEE Client API Specification - 4.4.2
published by GlobalPlatform.
Wrapper of flush_wallet_storage_internal () for a CA command . \ param session_data A data pointer to a session context . \ param param_types The types of the four parameters . \ param params A pointer to an array of four parameters . \ return TEE_SUCCESS in case of success otherwise returns the result received from the failed operation . The information about all possible returns is present in TEE Client API Specification - 4 . 4 . 2 published by GlobalPlatform .
static TEE_Result flush_wallet_storage(Session_data * session_data, uint32_t param_types, TEE_Param params[4])
{
	NonVolatileReturn nv_error = NV_NO_ERROR;
	TEE_Result result = TEE_SUCCESS;
	uint32_t exp_param_types;
	exp_param_types = TEE_PARAM_TYPES(
							TEE_PARAM_TYPE_VALUE_OUTPUT,
							TEE_PARAM_TYPE_NONE,
							TEE_PARAM_TYPE_NONE,
							TEE_PARAM_TYPE_NONE);
	if (param_types != exp_param_types)
	{
		result = TEE_ERROR_BAD_PARAMETERS;
		nv_error = NV_IO_ERROR;
		goto cleanup1;
	}
	result = flush_wallet_storage_internal(session_data, &nv_error);
	cleanup1:
		params[0].value.a = (uint32_t)nv_error;
		return result;
}
static TEE_Result flush_wallet_storage ( Session_data * session_data , uint32_t param_types , TEE_Param params [ 4 ] ) { NonVolatileReturn nv_error = NV_NO_ERROR ; TEE_Result result = TEE_SUCCESS ; uint32_t exp_param_types ; exp_param_types = TEE_PARAM_TYPES ( TEE_PARAM_TYPE_VALUE_OUTPUT , TEE_PARAM_TYPE_NONE , TEE_PARAM_TYPE_NONE , TEE_PARAM_TYPE_NONE ) ; if ( param_types != exp_param_types ) { result = TEE_ERROR_BAD_PARAMETERS ; nv_error = NV_IO_ERROR ; goto cleanup1 ; } result = flush_wallet_storage_internal ( session_data , & nv_error ) ; cleanup1 : params [ 0 ] . value . a = ( uint32_t ) nv_error ; return result ; }
Wrapper of flush_wallet_storage_internal() for a CA command.
Wrapper of flush_wallet_storage_internal () for a CA command .
/*
	 * Expected:
	 * [OUT] params[0].value.a -> NonVolatileReturn error.
	 */ /* Checks the types of the parameters received */ /* Resources cleanup */