本文整理汇总了C++中VOS_MemCpy函数的典型用法代码示例。如果您正苦于以下问题:C++ VOS_MemCpy函数的具体用法?C++ VOS_MemCpy怎么用?C++ VOS_MemCpy使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VOS_MemCpy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OM_Acpu_WriteLogFile
/*****************************************************************************
函 数 名 : OM_Acpu_WriteLogFile
功能描述 : 将错误信息记录到ERRORLOG中
输入参数 : cFileName: log文件名,包含路径信息
pRecord: 记录数据内容
ulLen: 记录数据长度
输出参数 : VOID
返 回 值 : 其他:函数执行过程中出现错误
VOS_OK:函数执行正常
修改历史 :
1.日 期 : 2012年5月8日
作 者 : zhuli
修改内容 : 新生成函数
*****************************************************************************/
VOS_UINT32 OM_Acpu_WriteLogFile(VOS_CHAR * cFileName, void *pRecord, VOS_UINT32 ulLen)
{
OM_WRITELOG_REQ_STRU *pstLogReq;
/* 参数检测 */
if ((VOS_NULL_PTR == cFileName) || (VOS_NULL_PTR == pRecord))
{
return OM_ACPU_PARA_ERR;
}
pstLogReq = (OM_WRITELOG_REQ_STRU*)VOS_AllocMsg(ACPU_PID_OMAGENT,
(sizeof(OM_WRITELOG_REQ_STRU)-VOS_MSG_HEAD_LENGTH)+ulLen);
/* 分配消息失败 */
if (VOS_NULL_PTR == pstLogReq)
{
return OM_ACPU_ALLOC_FAIL;
}
pstLogReq->ulReceiverPid = CCPU_PID_OMAGENT;
pstLogReq->usPrimId = OM_WRITE_LOG_REQ;
pstLogReq->ulLen = ulLen;
/* 为了确保aucFileName最后字节为'\0',拷贝长度需要加1 */
VOS_MemCpy(pstLogReq->aucFileName, cFileName, VOS_StrLen(cFileName)+1);
VOS_MemCpy(pstLogReq->aucData, pRecord, ulLen);
/* 将请求消息发送给CCPU */
if (VOS_OK != VOS_SendMsg(ACPU_PID_OMAGENT, pstLogReq))
{
return OM_ACPU_SEND_FAIL;
}
return VOS_OK;
}
示例2: STK_ProfileInit
VOS_VOID STK_ProfileInit(USIMM_STK_CFG_STRU *pstSTKProfileContent, VOS_UINT32 ulCardType)
{
VOS_UINT8 aucUsimProfile[]=STK_USIM_PROFILE_DEFAULT;
VOS_UINT8 aucSimProfile[]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xC0,
0xFF,0xFF,0xFF,0xF9,0xFF,0xF7,0xC0,0xFF,0xF0,0xFF};
if (NV_OK == NV_Read(en_NV_Item_TerminalProfile_Set, pstSTKProfileContent, sizeof(USIMM_STK_CFG_STRU)))
{
return;
}
pstSTKProfileContent->ucTimer = STK_POROTECT_TIME_LEN; /*定时器长度的单位是秒*/
pstSTKProfileContent->ucFuncEnable = TAF_TRUE;
if (USIMM_CARD_USIM == ulCardType)
{
VOS_MemCpy(pstSTKProfileContent->stUsimProfile.aucProfile, aucUsimProfile, sizeof(aucUsimProfile));
pstSTKProfileContent->stUsimProfile.ucProfileLen = sizeof(aucUsimProfile);
}
else
{
VOS_MemCpy(pstSTKProfileContent->stSimProfile.aucProfile, aucSimProfile, sizeof(aucSimProfile));
pstSTKProfileContent->stSimProfile.ucProfileLen = sizeof(aucSimProfile);
}
return;
}
示例3: USIMM_TelecomAuthCnf
VOS_VOID USIMM_TelecomAuthCnf(USIMM_AUTH_REQ_STRU *pstMsg, USIMM_TELECOM_AUTH_INFO_STRU *pstCnfInfo)
{
USIMM_AUTH_CNF_STRU *pstCnfMsg;
/* 分配消息内存 */
pstCnfMsg = (USIMM_AUTH_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(USIMM_AUTH_CNF_STRU)-VOS_MSG_HEAD_LENGTH);
if (VOS_NULL_PTR == pstCnfMsg)
{
USIMM_ERROR_LOG("USIMM_TelecomAuthCnf: VOS_AllocMsg is Failed");
return;
}
VOS_MemSet((VOS_UINT8*)pstCnfMsg + VOS_MSG_HEAD_LENGTH, 0, pstCnfMsg->ulLength);
pstCnfMsg->ulReceiverPid = pstMsg->ulSenderPid;
pstCnfMsg->ulMsgName = PS_USIM_AUTHENTICATION_CNF;
pstCnfMsg->enAppType = pstMsg->enAppType;
pstCnfMsg->enAuthType = pstMsg->enAuthType;
pstCnfMsg->ucOpId = pstMsg->ucOpId;
pstCnfMsg->enResult = pstCnfInfo->enResult;
if ((VOS_NULL_PTR != pstCnfInfo->pucIK)
&& (sizeof(pstCnfMsg->cnfdata.stTELECnf.aucIK) > pstCnfInfo->pucIK[0]))
{
VOS_MemCpy(pstCnfMsg->cnfdata.stTELECnf.aucIK, pstCnfInfo->pucIK, pstCnfInfo->pucIK[0] + 1);
}
if ((VOS_NULL_PTR != pstCnfInfo->pucCK)
&& (sizeof(pstCnfMsg->cnfdata.stTELECnf.aucCK) > pstCnfInfo->pucCK[0]))
{
VOS_MemCpy(pstCnfMsg->cnfdata.stTELECnf.aucCK, pstCnfInfo->pucCK, pstCnfInfo->pucCK[0] + 1);
}
if ((VOS_NULL_PTR != pstCnfInfo->pucGsmKC)
&& (sizeof(pstCnfMsg->cnfdata.stTELECnf.aucGsmKc) > pstCnfInfo->pucGsmKC[0]))
{
VOS_MemCpy(pstCnfMsg->cnfdata.stTELECnf.aucGsmKc, pstCnfInfo->pucGsmKC, pstCnfInfo->pucGsmKC[0] + 1);
}
if ((VOS_NULL_PTR != pstCnfInfo->pucAuts)
&& (sizeof(pstCnfMsg->cnfdata.stTELECnf.aucAuts) > pstCnfInfo->pucAuts[0]))
{
VOS_MemCpy(pstCnfMsg->cnfdata.stTELECnf.aucAuts, pstCnfInfo->pucAuts, pstCnfInfo->pucAuts[0] + 1);
}
if ((VOS_NULL_PTR != pstCnfInfo->pucAuthRes)
&& (sizeof(pstCnfMsg->cnfdata.stTELECnf.aucAuthRes) > pstCnfInfo->pucAuthRes[0]))
{
VOS_MemCpy(pstCnfMsg->cnfdata.stTELECnf.aucAuthRes, pstCnfInfo->pucAuthRes, pstCnfInfo->pucAuthRes[0] + 1);
}
/* 回复消息 */
(VOS_VOID)VOS_SendMsg(pstCnfMsg->ulSenderPid, pstCnfMsg);
return;
}
示例4: USIMM_AuthenVirtulSim
VOS_UINT32 USIMM_AuthenVirtulSim(USIMM_AUTH_REQ_STRU *pstMsg)
{
VOS_UINT8 aucOutPut[USIMM_AUTH_RES_LEN+USIMM_AUTH_KC_LEN] = {0}; /*RES+KC*/
VOS_UINT8 aucxRes[USIMM_AUTH_RES_LEN+1] = {0}; /*长度1Byte+内容*/
VOS_UINT8 aucGsmKC[USIMM_AUTH_KC_LEN+1] = {0}; /*长度1Byte+内容*/
VOS_UINT8 aucKi[USIMM_AUTH_KI_LEN];
VOS_UINT8 aucOpc[USIMM_AUTH_OPC_LEN]; /*不使用,但是需要避免XML里面有*/
USIMM_TELECOM_AUTH_INFO_STRU stCnfInfo;
VOS_MemSet(&stCnfInfo, 0, sizeof(stCnfInfo));
/* 解密全局变量中的Ki Opc */
if(VOS_OK != USIMM_VsimGetRealKiOpc(aucKi, aucOpc))
{
stCnfInfo.enResult = USIMM_AUTH_GSM_OTHER_FAILURE;
USIMM_TelecomAuthCnf(pstMsg, &stCnfInfo);
return VOS_ERR;
}
if(USIMM_VSIM_COMPV1 == g_stUSIMMVSimAuthInfo.enAuthType) /*comp 128 v1*/
{
RUNA3A8_V1(aucKi, &pstMsg->aucData[1], aucOutPut);
}
else if(USIMM_VSIM_COMPV2 == g_stUSIMMVSimAuthInfo.enAuthType) /*comp 128 v2*/
{
/* coverity[uninit_use_in_call] */
RUNA3A8_V2(aucKi, &pstMsg->aucData[1], aucOutPut);
}
else /*comp 128 v3*/
{
/* coverity[uninit_use_in_call] */
RUNA3A8_V3(aucKi, &pstMsg->aucData[1], aucOutPut);
}
aucxRes[0] = USIMM_AUTH_RES_LEN;
VOS_MemCpy(&aucxRes[1], aucOutPut, USIMM_AUTH_RES_LEN);
aucGsmKC[0] = USIMM_AUTH_KC_LEN;
VOS_MemCpy(&aucGsmKC[1], &aucOutPut[USIMM_AUTH_RES_LEN], USIMM_AUTH_KC_LEN);
stCnfInfo.pucAuthRes = aucxRes;
stCnfInfo.pucIK = VOS_NULL_PTR;
stCnfInfo.pucCK = VOS_NULL_PTR;
stCnfInfo.pucGsmKC = aucGsmKC;
stCnfInfo.pucAuts = VOS_NULL_PTR;
stCnfInfo.enResult = USIMM_AUTH_GSM_SUCCESS;
USIMM_TelecomAuthCnf(pstMsg, &stCnfInfo);
return VOS_OK;
}
示例5: diag_FsQueryProc
VOS_UINT32 diag_FsQueryProc(VOS_UINT8* pstReq,VOS_UINT32 ulCmdId)
{
DIAG_CMD_FS_QUERY_REQ* pstFsReq = NULL;
DIAG_CMD_FS_QUERY_CNF stFsCnf = {0};
VOS_UINT32 ret = ERR_MSP_SUCCESS;
pstFsReq = (DIAG_CMD_FS_QUERY_REQ*)(DIAG_OFFSET_HEAD_GET_DATA(pstReq));
if (DIAG_FS_ROOT_FOLDER == pstFsReq->ulFolderType)
{
#if(VOS_OS_VER == VOS_LINUX)
/* 锁定状态下,根目录受限制 */
if(g_bAtDataLocked)
{
stFsCnf.ulLength = VOS_StrLen((VOS_CHAR*)g_acDiagLockedRootPath);
VOS_MemCpy(stFsCnf.aucDirPath,g_acDiagLockedRootPath, stFsCnf.ulLength);
}
else
{
stFsCnf.ulLength = VOS_StrLen((VOS_CHAR*)g_acDiagRootPath);
VOS_MemCpy(stFsCnf.aucDirPath,g_acDiagRootPath, stFsCnf.ulLength);
}
#else
stFsCnf.ulLength = VOS_StrLen((VOS_CHAR*)g_acDiagRootPath);
VOS_MemCpy(stFsCnf.aucDirPath,g_acDiagRootPath, stFsCnf.ulLength);
#endif
g_stDiagFileInfo.ulFileType = DIAG_FS_ROOT_FOLDER;
}
else if (DIAG_FS_LOG_FOLDER == pstFsReq->ulFolderType)
{
stFsCnf.ulLength = VOS_StrLen((VOS_CHAR*)g_acDiagLogDir);
VOS_MemCpy(stFsCnf.aucDirPath,g_acDiagLogDir, stFsCnf.ulLength);
g_stDiagFileInfo.ulFileType = DIAG_FS_LOG_FOLDER;
}
/*临终遗言文件所在的路径*/
else if (DIAG_FS_DUMP_FOLDER == pstFsReq->ulFolderType)
{
stFsCnf.ulLength = VOS_StrLen((VOS_CHAR*)g_acDiagDumpDir);
VOS_MemCpy(stFsCnf.aucDirPath, g_acDiagDumpDir, stFsCnf.ulLength);
g_stDiagFileInfo.ulFileType = DIAG_FS_DUMP_FOLDER;
}
else
{
ret = ERR_MSP_FAILURE;
}
stFsCnf.ulRet = ret;
/*打包回复给FW*/
ret = diag_AgentCnfFun((VOS_UINT8*)&stFsCnf,ulCmdId,sizeof(DIAG_CMD_FS_QUERY_CNF));
return ret;
}
开发者ID:fly2436732935,项目名称:android_kernel_honor7_PLK-AL10_PLK-TL01H_PLK-UL00_PLK-CL00_PLK-TL00,代码行数:53,代码来源:diag_fs_proc.c
示例6: SC_FAC_SetDhKey
SC_ERROR_CODE_ENUM_UINT32 SC_FAC_SetDhKey(
MODEM_ID_ENUM_UINT16 enModemID,
SC_DH_KEY_TYPE_ENUM_UINT32 enKeyType,
VOS_UINT32 ulKeyLen,
VOS_UINT8 *pucKey
)
{
VOS_UINT32 ulResult;
NVIM_VSIM_HVSDH_NV_STRU stDhNv;
/* 判断鉴权是否通过 */
if (SC_AUTH_STATUS_DONE != SC_CTX_GetFacAuthStatus())
{
SC_ERROR_LOG("SC_FAC_SetDhKey: SC_CTX_GetFacAuthStatus is not done.");
return SC_ERROR_CODE_IDENTIFY_NOT_FINISH;
}
/* 从NV项中读出密钥信息 */
ulResult = NV_ReadEx(enModemID, en_NV_Item_VSIM_HVSDH_INFO, &stDhNv, sizeof(stDhNv));
if (NV_OK != ulResult)
{
SC_ERROR_LOG("SC_FAC_SetDhKey: NV_Read fail.");
return SC_ERROR_CODE_NV_READ_FAIL;
}
if (SC_DH_KEY_SERVER_PUBLIC_KEY == enKeyType)
{
VOS_MemCpy(stDhNv.stSPublicKey.aucKey, pucKey, ulKeyLen);
stDhNv.stSPublicKey.ulKeyLen = ulKeyLen;
}
else if (SC_DH_KEY_MODEM_PUBLIC_KEY == enKeyType)
{
VOS_MemCpy(stDhNv.stCPublicKey.aucKey, pucKey, ulKeyLen);
stDhNv.stCPublicKey.ulKeyLen = ulKeyLen;
}
else
{
VOS_MemCpy(stDhNv.stCPrivateKey.aucKey, pucKey, ulKeyLen);
stDhNv.stCPrivateKey.ulKeyLen = ulKeyLen;
}
/* 将服务器公钥写入NV项中 */
ulResult = NV_WriteEx(enModemID, en_NV_Item_VSIM_HVSDH_INFO, &stDhNv, sizeof(stDhNv));
if (NV_OK != ulResult)
{
SC_ERROR_LOG("SC_FAC_SetDhKey: NV_Write fail.");
return SC_ERROR_CODE_NV_WRITE_FAIL;
}
return SC_ERROR_CODE_NO_ERROR;
}
示例7: SI_STK_DecodeMoSmsRspSpecial
VOS_VOID SI_STK_DecodeMoSmsRspSpecial(
VOS_UINT32 ulDataLen,
VOS_UINT8 *pucCmdData,
SI_STK_ENVELOPE_RSP_STRU *pstRspData)
{
VOS_UINT32 ulTagOffset;
ulTagOffset = SI_STKFindTag(ADDRESS_TAG, pucCmdData, ulDataLen, 1);
if(ulTagOffset != SI_TAGNOTFOUND)
{
pstRspData->uResp.MoSmsCtrlRsp.Addr1.ucLen = pucCmdData[ulTagOffset] - 1;
pstRspData->uResp.MoSmsCtrlRsp.Addr1.ucNumType = pucCmdData[ulTagOffset+1];
pstRspData->uResp.MoSmsCtrlRsp.Addr1.pucAddr
= (SI_UINT8*)VOS_MemAlloc(MAPS_STK_PID, DYNAMIC_MEM_PT, pstRspData->uResp.MoSmsCtrlRsp.Addr1.ucLen);
if(VOS_NULL_PTR != pstRspData->uResp.MoSmsCtrlRsp.Addr1.pucAddr)
{
/*lint -e534*/
VOS_MemCpy(pstRspData->uResp.MoSmsCtrlRsp.Addr1.pucAddr,
&pucCmdData[ulTagOffset+2], pstRspData->uResp.MoSmsCtrlRsp.Addr1.ucLen);
/*lint +e534*/
}
pstRspData->uResp.MoSmsCtrlRsp.OP_Addr1 = 1;
}
ulTagOffset = SI_STKFindTag(ADDRESS_TAG, pucCmdData, ulDataLen, 2);
if(ulTagOffset != SI_TAGNOTFOUND)
{
pstRspData->uResp.MoSmsCtrlRsp.Addr2.ucLen = pucCmdData[ulTagOffset] - 1;
pstRspData->uResp.MoSmsCtrlRsp.Addr2.ucNumType = pucCmdData[ulTagOffset+1];
pstRspData->uResp.MoSmsCtrlRsp.Addr2.pucAddr
= (SI_UINT8*)VOS_MemAlloc(MAPS_STK_PID, DYNAMIC_MEM_PT, pstRspData->uResp.MoSmsCtrlRsp.Addr2.ucLen);
if(VOS_NULL_PTR != pstRspData->uResp.MoSmsCtrlRsp.Addr2.pucAddr)
{
/*lint -e534*/
VOS_MemCpy(pstRspData->uResp.MoSmsCtrlRsp.Addr2.pucAddr,
&pucCmdData[ulTagOffset+2], pstRspData->uResp.MoSmsCtrlRsp.Addr2.ucLen);
/*lint +e534*/
}
pstRspData->uResp.MoSmsCtrlRsp.OP_Addr2 = 1;
}
return;
}
示例8: USIMM_VsimHUKDecode
VOS_UINT32 USIMM_VsimHUKDecode(VOS_UINT8 *pucSrc,
VOS_UINT32 ulSrcLen,
VOS_UINT8 *pucDst,
VOS_UINT32 *pulDstLen)
{
#if (FEATURE_ON == FEATURE_SECURITY_PHONE)
VOS_UINT8 auckey[USIMM_HUK_LEN];
VOS_INT32 lDstLen;
if (BSP_OK != efuseReadHUK((BSP_U32 *)auckey, (sizeof(auckey)/sizeof(BSP_U32))))
{
USIMM_ERROR_LOG("USIMM_VsimHUKDecode: efuseReadHUK Failed");
return VOS_ERR;
}
lDstLen = AESDecryptS(pucSrc, (VOS_INT)ulSrcLen, auckey, USIMM_HUK_BITS, pucDst, VSIM_DH_AGREE_KEY);
if (VOS_NULL == lDstLen)
{
USIMM_ERROR_LOG("USIMM_VsimHUKDecode: AESEncrypt Fail");
return VOS_ERR;
}
*pulDstLen = (VOS_UINT32)lDstLen;
#else
VOS_MemCpy(pucDst, pucSrc, ulSrcLen);
*pulDstLen = ulSrcLen;
#endif /*(FEATURE_ON == FEATURE_SECURITY_PHONE)*/
return VOS_OK;
}
示例9: diag_PortAddToDataBuf
VOS_VOID diag_PortAddToDataBuf(DIAG_PORT_PHY_BEAR_ENUM enPort, VOS_UINT8 * data, VOS_UINT32 dataSize)
{
DIAG_PORT_DATA_BUF_STRU * pNewNode = NULL;
/*申请一个节点大小*/
pNewNode = (DIAG_PORT_DATA_BUF_STRU *)VOS_MemAlloc(MSP_PID_DIAG_APP_AGENT, DYNAMIC_MEM_PT, sizeof(DIAG_PORT_DATA_BUF_STRU));
if (NULL == pNewNode)
{
diag_printf("%s: alloc mem for new node fail\n", __FUNCTION__);
return;
}
/*申请数据空间*/
pNewNode->dataBuf = (VOS_UINT8 *)VOS_MemAlloc(MSP_PID_DIAG_APP_AGENT, DYNAMIC_MEM_PT, dataSize);
if (NULL == pNewNode->dataBuf)
{
diag_printf("%s: alloc mem for data buf fail\n", __FUNCTION__);
return;
}
pNewNode->port = enPort;
pNewNode->dataLen = dataSize;
VOS_MemCpy(pNewNode->dataBuf, data, dataSize);
(VOS_VOID)VOS_SmP(g_diagPortSem,0);
/* 插入节点到链表尾部 */
blist_add_tail(&pNewNode->dataList, &g_diagPortDataBuf.dataList);
(VOS_VOID)VOS_SmV(g_diagPortSem);
}
示例10: USIMM_EccNumberInd
VOS_VOID USIMM_EccNumberInd(VOS_UINT8 ucEccType,
VOS_UINT16 usEfLen,
VOS_UINT8 ucRecordNum,
VOS_UINT8 *pucData)
{
PS_USIM_ECC_IND_STRU *pUsimMsg;
pUsimMsg = (PS_USIM_ECC_IND_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, (sizeof(PS_USIM_ECC_IND_STRU)-VOS_MSG_HEAD_LENGTH)+usEfLen);
if (VOS_NULL_PTR == pUsimMsg)
{
return;
}
pUsimMsg->ulReceiverPid = MAPS_PB_PID; /*填写PB的PID*/
pUsimMsg->ulMsgName = PS_USIM_ECCNUMBER_IND;
pUsimMsg->ucEccType = ucEccType;
pUsimMsg->ucRecordNum = ucRecordNum;
pUsimMsg->usFileSize = usEfLen;
if(0 != usEfLen)
{
VOS_MemCpy(pUsimMsg->ucContent, pucData, usEfLen);
}
(VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);
return;
}
示例11: USIMM_SearchHandleCnf
VOS_VOID USIMM_SearchHandleCnf(VOS_UINT32 ulReceiverPid,
VOS_UINT32 ulErrorCode,
USIMM_SEARCHCNF_INFO_STRU *pstCnfInfo)
{
PS_USIM_SEARCH_CNF_STRU *pUsimMsg;
pUsimMsg = (PS_USIM_SEARCH_CNF_STRU *)VOS_AllocMsg(WUEPS_PID_USIM,
(sizeof(PS_USIM_SEARCH_CNF_STRU) - VOS_MSG_HEAD_LENGTH) + pstCnfInfo->ulLen);
if (VOS_NULL_PTR == pUsimMsg)
{
USIMM_ERROR_LOG("USIMM_SearchHandleCnf: VOS_AllocMsg is Failed");
return;
}
pUsimMsg->ulReceiverPid = ulReceiverPid;
pUsimMsg->ulMsgName = PS_USIM_SEARCH_CNF;
pUsimMsg->ulErrorCode = ulErrorCode;
pUsimMsg->usTotalRecNum = pstCnfInfo->usTotalRecNum;
pUsimMsg->usEfId = pstCnfInfo->usEfid;
pUsimMsg->ulResult = ulErrorCode;
pUsimMsg->ucLen = 0;
if ((VOS_NULL_PTR != pstCnfInfo->pucData) && (pstCnfInfo->ulLen <= 255))
{
VOS_MemCpy(pUsimMsg->aucContent, pstCnfInfo->pucData, pstCnfInfo->ulLen);
pUsimMsg->ucLen = (VOS_UINT8)pstCnfInfo->ulLen;
}
(VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);
return;
}
示例12: USIMM_PinHandleCnf
VOS_VOID USIMM_PinHandleCnf(VOS_UINT32 ulReceiverPid,
USIMM_PIN_CMD_TYPE_ENUM_UINT32 enCmdType,
USIMM_PIN_TYPE_ENUM_UINT32 enPINType,
VOS_UINT32 ulResult,
USIMM_PIN_INFO_STRU *pstPINinfo)
{
PS_USIM_PIN_CNF_STRU *pUsimMsg;
pUsimMsg = (PS_USIM_PIN_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, sizeof(PS_USIM_PIN_CNF_STRU)-VOS_MSG_HEAD_LENGTH);
if (VOS_NULL_PTR == pUsimMsg)
{
USIMM_ERROR_LOG("USIMM_PinHandleCnf: VOS_AllocMsg is Failed");
return;
}
pUsimMsg->ulReceiverPid = ulReceiverPid;
pUsimMsg->ulMsgName = PS_USIM_PIN_OPERATE_RSP;
pUsimMsg->ulResult = ulResult;
pUsimMsg->enCmdType = enCmdType;
pUsimMsg->enPinType = enPINType;
VOS_MemCpy(&pUsimMsg->stPinInfo, pstPINinfo, sizeof(USIMM_PIN_INFO_STRU));
(VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);
return;
}
示例13: diag_SendMsg
VOS_UINT32 diag_SendMsg(VOS_UINT32 ulSenderId, VOS_UINT32 ulRecverId, VOS_UINT32 ulMsgId, VOS_UINT8* pDta, VOS_UINT32 dtaSize)
{
VOS_UINT32 ret = ERR_MSP_UNKNOWN;
DIAG_DATA_MSG_STRU* pDataMsg = NULL;
/*lint -save -e740*/
pDataMsg = (DIAG_DATA_MSG_STRU*)VOS_AllocMsg(ulSenderId,(sizeof(DIAG_DATA_MSG_STRU)+ dtaSize - 20));
/*lint -restore*/
if (pDataMsg != NULL)
{
pDataMsg->ulReceiverPid = ulRecverId;
pDataMsg->ulSenderPid = ulSenderId;
pDataMsg->ulLength = sizeof(DIAG_DATA_MSG_STRU)+ dtaSize - 20;
pDataMsg->ulMsgId = ulMsgId;
pDataMsg->ulLen = dtaSize;
VOS_MemCpy(pDataMsg->pContext,pDta,dtaSize);
ret = VOS_SendMsg(ulSenderId, pDataMsg);
if (ret != VOS_OK)
{
diag_printf("diag_SendMsg ulSenderId=%d,ulRecverId=%d,ulMsgId=0x%x,pDta=%p,dtaSize=%d!\n",ulSenderId,ulRecverId,ulMsgId,pDta,dtaSize);
}
else
{
ret = ERR_MSP_SUCCESS;
}
}
return ret;
}
开发者ID:fly2436732935,项目名称:android_kernel_honor7_PLK-AL10_PLK-TL01H_PLK-UL00_PLK-CL00_PLK-TL00,代码行数:31,代码来源:diag_common.c
示例14: USIMM_GetFileCnf
VOS_VOID USIMM_GetFileCnf(VOS_UINT32 ulReceiverPid,
VOS_UINT32 ulSendPara,
VOS_UINT32 ulErrorCode,
USIMM_GETCNF_INFO_STRU *pstCnfInfo)
{
PS_USIM_GET_FILE_CNF_STRU *pUsimMsg;
VOS_UINT32 ulResult;
if(ulErrorCode != USIMM_SW_OK)
{
ulResult = VOS_ERR;
}
else
{
ulResult = VOS_OK;
}
if( WUEPS_PID_OM == ulReceiverPid )
{
USIMM_OmFileCnf(ulResult,pstCnfInfo->usEfLen,pstCnfInfo->pucEf,USIMM_OM_GET_CNF);
return;
}
pUsimMsg = (PS_USIM_GET_FILE_CNF_STRU*)VOS_AllocMsg(WUEPS_PID_USIM, (sizeof(PS_USIM_GET_FILE_CNF_STRU)-VOS_MSG_HEAD_LENGTH)+pstCnfInfo->usDataLen);
if(VOS_NULL_PTR == pUsimMsg)
{
USIMM_ERROR_LOG("USIMM_GetFileCnf: VOS_AllocMsg is Failed");
return;
}
pUsimMsg->ulMsgName = PS_USIM_GET_FILE_RSP;
pUsimMsg->ulReceiverPid = ulReceiverPid;
pUsimMsg->ulErrorCode = ulErrorCode;
pUsimMsg->ulSendPara = ulSendPara;
pUsimMsg->usEfId = pstCnfInfo->usEfId;
if(USIMM_SW_OK == ulErrorCode)
{
pUsimMsg->ucRecordNum = pstCnfInfo->ucRecordNum;
pUsimMsg->usEfLen = pstCnfInfo->usEfLen;
pUsimMsg->ucTotalNum = pstCnfInfo->ucTotalNum;
pUsimMsg->ulResult = VOS_OK;
VOS_MemCpy(pUsimMsg->aucEf, pstCnfInfo->pucEf, pstCnfInfo->usDataLen);
}
else
{
pUsimMsg->ucRecordNum = 0;
pUsimMsg->usEfLen = 0;
pUsimMsg->ucTotalNum = 0;
pUsimMsg->ulResult = VOS_ERR;
}
(VOS_VOID)VOS_SendMsg(pUsimMsg->ulSenderPid, pUsimMsg);
return;
}
示例15: diag_SendPsTransMsg
VOS_UINT32 diag_SendPsTransMsg(VOS_UINT32 ulRecverId, VOS_UINT8* pDta, VOS_UINT32 dtaSize)
{
VOS_UINT32 ret = ERR_MSP_UNKNOWN;
DIAG_PS_MSG_STRU* pDataMsg = NULL;
/*传进来的dtaSize已经包含了VOS HEADER,因此申请时需要-20*/
/*lint -save -e740*/
pDataMsg = (DIAG_PS_MSG_STRU*)VOS_AllocMsg(diag_GetAgentPid(),dtaSize -VOS_MSG_HEAD_LENGTH);
/*lint -restore*/
if (pDataMsg)
{
VOS_MemCpy(pDataMsg,pDta,dtaSize);
pDataMsg->ulReceiverPid = ulRecverId;
pDataMsg->ulSenderPid = diag_GetAgentPid();
/* coverity[overflow_const] */
pDataMsg->ulLength = dtaSize - VOS_MSG_HEAD_LENGTH;
ret = VOS_SendMsg(diag_GetAgentPid(), pDataMsg);
if (ret != VOS_OK)
{
diag_printf(" ulRecverId=%d,pDta=%p,dtaSize=%d!\n",ulRecverId,pDta,dtaSize);
}
else
{
ret = ERR_MSP_SUCCESS;
}
}
return ret;
}
开发者ID:fly2436732935,项目名称:android_kernel_honor7_PLK-AL10_PLK-TL01H_PLK-UL00_PLK-CL00_PLK-TL00,代码行数:31,代码来源:diag_common.c