/external/ltp/lib/ |
D | safe_macros.c | 31 char *rval; in safe_basename() local 33 rval = basename(path); in safe_basename() 35 if (rval == NULL) { in safe_basename() 40 return rval; in safe_basename() 47 int rval; in safe_chdir() local 49 rval = chdir(path); in safe_chdir() 51 if (rval == -1) { in safe_chdir() 54 } else if (rval) { in safe_chdir() 56 "Invalid chdir(%s) return value %d", path, rval); in safe_chdir() 59 return rval; in safe_chdir() [all …]
|
D | tst_safe_macros.c | 26 int rval; in safe_access() local 28 rval = access(pathname, mode); in safe_access() 30 if (rval == -1) { in safe_access() 33 } else if (rval) { in safe_access() 36 mode, rval); in safe_access() 39 return rval; in safe_access() 44 int rval; in safe_setpgid() local 46 rval = setpgid(pid, pgid); in safe_setpgid() 48 if (rval == -1) { in safe_setpgid() 51 } else if (rval) { in safe_setpgid() [all …]
|
D | tst_safe_sysv_ipc.c | 66 int rval; in safe_msgget() local 68 rval = msgget(key, msgflg); in safe_msgget() 70 if (rval == -1) { in safe_msgget() 73 } else if (rval < 0) { in safe_msgget() 76 msgflg, rval); in safe_msgget() 79 return rval; in safe_msgget() 85 int rval; in safe_msgsnd() local 87 rval = msgsnd(msqid, msgp, msgsz, msgflg); in safe_msgsnd() 89 if (rval == -1) { in safe_msgsnd() 93 } else if (rval) { in safe_msgsnd() [all …]
|
D | safe_pthread.c | 16 int rval; in safe_pthread_create() local 18 rval = pthread_create(thread_id, attr, thread_fn, arg); in safe_pthread_create() 20 if (rval) { in safe_pthread_create() 23 attr, thread_fn, arg, tst_strerrno(rval)); in safe_pthread_create() 26 return rval; in safe_pthread_create() 32 int rval; in safe_pthread_join() local 34 rval = pthread_join(thread_id, retval); in safe_pthread_join() 36 if (rval) { in safe_pthread_join() 39 retval, tst_strerrno(rval)); in safe_pthread_join() 42 return rval; in safe_pthread_join() [all …]
|
D | safe_net.c | 111 int rval, ttype; in safe_socket() local 113 rval = socket(domain, type, protocol); in safe_socket() 115 if (rval == -1) { in safe_socket() 130 } else if (rval < 0) { in safe_socket() 133 type, protocol, rval); in safe_socket() 136 return rval; in safe_socket() 142 int rval, ttype; in safe_socketpair() local 144 rval = socketpair(domain, type, protocol, sv); in safe_socketpair() 146 if (rval == -1) { in safe_socketpair() 160 } else if (rval) { in safe_socketpair() [all …]
|
/external/tpm2-tss/test/tpmclient/ |
D | tpmclient.int.c | 66 static void ErrorHandler(UINT32 rval, char *errorString, int errorStringSize) in ErrorHandler() argument 68 UINT32 errorLevel = rval & TSS2_RC_LAYER_MASK; in ErrorHandler() 96 snprintf(errorString, errorStringSize, "%s Error: 0x%x\n", levelString, rval); in ErrorHandler() 117 #define CheckPassed(rval) { \ argument 119 if ((rval) != TPM2_RC_SUCCESS) { \ 120 ErrorHandler((rval), error_string, ERROR_STR_LEN); \ 130 #define CheckFailed(rval, expected_rval) { \ argument 132 if ((rval) != (expected_rval)) { \ 133 ErrorHandler((rval), error_string, ERROR_STR_LEN); \ 135 error_string, (expected_rval), (rval), __FUNCTION__, __LINE__ ); \ [all …]
|
/external/tpm2-tss/src/tss2-sys/api/ |
D | Tss2_Sys_CreatePrimary.c | 24 TSS2_RC rval; in Tss2_Sys_CreatePrimary_Prepare() local 32 rval = CommonPreparePrologue(ctx, TPM2_CC_CreatePrimary); in Tss2_Sys_CreatePrimary_Prepare() 33 if (rval) in Tss2_Sys_CreatePrimary_Prepare() 34 return rval; in Tss2_Sys_CreatePrimary_Prepare() 36 rval = Tss2_MU_UINT32_Marshal(primaryHandle, ctx->cmdBuffer, in Tss2_Sys_CreatePrimary_Prepare() 39 if (rval) in Tss2_Sys_CreatePrimary_Prepare() 40 return rval; in Tss2_Sys_CreatePrimary_Prepare() 45 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_CreatePrimary_Prepare() 49 rval = Tss2_MU_TPM2B_SENSITIVE_CREATE_Marshal(inSensitive, in Tss2_Sys_CreatePrimary_Prepare() 55 if (rval) in Tss2_Sys_CreatePrimary_Prepare() [all …]
|
D | Tss2_Sys_Create.c | 24 TSS2_RC rval; in Tss2_Sys_Create_Prepare() local 29 rval = ValidateTPML_PCR_SELECTION(creationPCR); in Tss2_Sys_Create_Prepare() 30 if (rval) in Tss2_Sys_Create_Prepare() 31 return rval; in Tss2_Sys_Create_Prepare() 33 rval = CommonPreparePrologue(ctx, TPM2_CC_Create); in Tss2_Sys_Create_Prepare() 34 if (rval) in Tss2_Sys_Create_Prepare() 35 return rval; in Tss2_Sys_Create_Prepare() 37 rval = Tss2_MU_UINT32_Marshal(parentHandle, ctx->cmdBuffer, in Tss2_Sys_Create_Prepare() 40 if (rval) in Tss2_Sys_Create_Prepare() 41 return rval; in Tss2_Sys_Create_Prepare() [all …]
|
D | Tss2_Sys_CreateLoaded.c | 22 TSS2_RC rval; in Tss2_Sys_CreateLoaded_Prepare() local 30 rval = CommonPreparePrologue(ctx, TPM2_CC_CreateLoaded); in Tss2_Sys_CreateLoaded_Prepare() 31 if (rval) in Tss2_Sys_CreateLoaded_Prepare() 32 return rval; in Tss2_Sys_CreateLoaded_Prepare() 34 rval = Tss2_MU_UINT32_Marshal(parentHandle, ctx->cmdBuffer, in Tss2_Sys_CreateLoaded_Prepare() 37 if (rval) in Tss2_Sys_CreateLoaded_Prepare() 38 return rval; in Tss2_Sys_CreateLoaded_Prepare() 43 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_CreateLoaded_Prepare() 47 rval = Tss2_MU_TPM2B_SENSITIVE_CREATE_Marshal(inSensitive, in Tss2_Sys_CreateLoaded_Prepare() 53 if (rval) in Tss2_Sys_CreateLoaded_Prepare() [all …]
|
D | Tss2_Sys_PolicySigned.c | 26 TSS2_RC rval; in Tss2_Sys_PolicySigned_Prepare() local 31 rval = CommonPreparePrologue(ctx, TPM2_CC_PolicySigned); in Tss2_Sys_PolicySigned_Prepare() 32 if (rval) in Tss2_Sys_PolicySigned_Prepare() 33 return rval; in Tss2_Sys_PolicySigned_Prepare() 35 rval = Tss2_MU_UINT32_Marshal(authObject, ctx->cmdBuffer, in Tss2_Sys_PolicySigned_Prepare() 38 if (rval) in Tss2_Sys_PolicySigned_Prepare() 39 return rval; in Tss2_Sys_PolicySigned_Prepare() 41 rval = Tss2_MU_UINT32_Marshal(policySession, ctx->cmdBuffer, in Tss2_Sys_PolicySigned_Prepare() 44 if (rval) in Tss2_Sys_PolicySigned_Prepare() 45 return rval; in Tss2_Sys_PolicySigned_Prepare() [all …]
|
D | Tss2_Sys_NV_Certify.c | 26 TSS2_RC rval; in Tss2_Sys_NV_Certify_Prepare() local 31 rval = CommonPreparePrologue(ctx, TPM2_CC_NV_Certify); in Tss2_Sys_NV_Certify_Prepare() 32 if (rval) in Tss2_Sys_NV_Certify_Prepare() 33 return rval; in Tss2_Sys_NV_Certify_Prepare() 35 rval = Tss2_MU_UINT32_Marshal(signHandle, ctx->cmdBuffer, in Tss2_Sys_NV_Certify_Prepare() 38 if (rval) in Tss2_Sys_NV_Certify_Prepare() 39 return rval; in Tss2_Sys_NV_Certify_Prepare() 41 rval = Tss2_MU_UINT32_Marshal(authHandle, ctx->cmdBuffer, in Tss2_Sys_NV_Certify_Prepare() 44 if (rval) in Tss2_Sys_NV_Certify_Prepare() 45 return rval; in Tss2_Sys_NV_Certify_Prepare() [all …]
|
D | Tss2_Sys_Import.c | 25 TSS2_RC rval; in Tss2_Sys_Import_Prepare() local 30 rval = CommonPreparePrologue(ctx, TPM2_CC_Import); in Tss2_Sys_Import_Prepare() 31 if (rval) in Tss2_Sys_Import_Prepare() 32 return rval; in Tss2_Sys_Import_Prepare() 34 rval = Tss2_MU_UINT32_Marshal(parentHandle, ctx->cmdBuffer, in Tss2_Sys_Import_Prepare() 37 if (rval) in Tss2_Sys_Import_Prepare() 38 return rval; in Tss2_Sys_Import_Prepare() 43 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_Import_Prepare() 48 rval = Tss2_MU_TPM2B_DATA_Marshal(encryptionKey, ctx->cmdBuffer, in Tss2_Sys_Import_Prepare() 53 if (rval) in Tss2_Sys_Import_Prepare() [all …]
|
D | Tss2_Sys_StartAuthSession.c | 26 TSS2_RC rval; in Tss2_Sys_StartAuthSession_Prepare() local 34 rval = CommonPreparePrologue(ctx, TPM2_CC_StartAuthSession); in Tss2_Sys_StartAuthSession_Prepare() 35 if (rval) in Tss2_Sys_StartAuthSession_Prepare() 36 return rval; in Tss2_Sys_StartAuthSession_Prepare() 38 rval = Tss2_MU_UINT32_Marshal(tpmKey, ctx->cmdBuffer, in Tss2_Sys_StartAuthSession_Prepare() 41 if (rval) in Tss2_Sys_StartAuthSession_Prepare() 42 return rval; in Tss2_Sys_StartAuthSession_Prepare() 44 rval = Tss2_MU_UINT32_Marshal(bind, ctx->cmdBuffer, in Tss2_Sys_StartAuthSession_Prepare() 47 if (rval) in Tss2_Sys_StartAuthSession_Prepare() 48 return rval; in Tss2_Sys_StartAuthSession_Prepare() [all …]
|
D | Tss2_Sys_Commit.c | 23 TSS2_RC rval; in Tss2_Sys_Commit_Prepare() local 28 rval = CommonPreparePrologue(ctx, TPM2_CC_Commit); in Tss2_Sys_Commit_Prepare() 29 if (rval) in Tss2_Sys_Commit_Prepare() 30 return rval; in Tss2_Sys_Commit_Prepare() 32 rval = Tss2_MU_UINT32_Marshal(signHandle, ctx->cmdBuffer, in Tss2_Sys_Commit_Prepare() 35 if (rval) in Tss2_Sys_Commit_Prepare() 36 return rval; in Tss2_Sys_Commit_Prepare() 41 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_Commit_Prepare() 45 rval = Tss2_MU_TPM2B_ECC_POINT_Marshal(P1, ctx->cmdBuffer, in Tss2_Sys_Commit_Prepare() 50 if (rval) in Tss2_Sys_Commit_Prepare() [all …]
|
D | Tss2_Sys_PolicySecret.c | 25 TSS2_RC rval; in Tss2_Sys_PolicySecret_Prepare() local 30 rval = CommonPreparePrologue(ctx, TPM2_CC_PolicySecret); in Tss2_Sys_PolicySecret_Prepare() 31 if (rval) in Tss2_Sys_PolicySecret_Prepare() 32 return rval; in Tss2_Sys_PolicySecret_Prepare() 34 rval = Tss2_MU_UINT32_Marshal(authHandle, ctx->cmdBuffer, in Tss2_Sys_PolicySecret_Prepare() 37 if (rval) in Tss2_Sys_PolicySecret_Prepare() 38 return rval; in Tss2_Sys_PolicySecret_Prepare() 40 rval = Tss2_MU_UINT32_Marshal(policySession, ctx->cmdBuffer, in Tss2_Sys_PolicySecret_Prepare() 43 if (rval) in Tss2_Sys_PolicySecret_Prepare() 44 return rval; in Tss2_Sys_PolicySecret_Prepare() [all …]
|
D | Tss2_Sys_CertifyCreation.c | 25 TSS2_RC rval; in Tss2_Sys_CertifyCreation_Prepare() local 30 rval = CommonPreparePrologue(ctx, TPM2_CC_CertifyCreation); in Tss2_Sys_CertifyCreation_Prepare() 31 if (rval) in Tss2_Sys_CertifyCreation_Prepare() 32 return rval; in Tss2_Sys_CertifyCreation_Prepare() 34 rval = Tss2_MU_UINT32_Marshal(signHandle, ctx->cmdBuffer, in Tss2_Sys_CertifyCreation_Prepare() 37 if (rval) in Tss2_Sys_CertifyCreation_Prepare() 38 return rval; in Tss2_Sys_CertifyCreation_Prepare() 40 rval = Tss2_MU_UINT32_Marshal(objectHandle, ctx->cmdBuffer, in Tss2_Sys_CertifyCreation_Prepare() 43 if (rval) in Tss2_Sys_CertifyCreation_Prepare() 44 return rval; in Tss2_Sys_CertifyCreation_Prepare() [all …]
|
D | Tss2_Sys_EncryptDecrypt2.c | 24 TSS2_RC rval; in Tss2_Sys_EncryptDecrypt2_Prepare() local 29 rval = CommonPreparePrologue (ctx, TPM2_CC_EncryptDecrypt2); in Tss2_Sys_EncryptDecrypt2_Prepare() 30 if (rval) in Tss2_Sys_EncryptDecrypt2_Prepare() 31 return rval; in Tss2_Sys_EncryptDecrypt2_Prepare() 33 rval = Tss2_MU_UINT32_Marshal (keyHandle, in Tss2_Sys_EncryptDecrypt2_Prepare() 37 if (rval) in Tss2_Sys_EncryptDecrypt2_Prepare() 38 return rval; in Tss2_Sys_EncryptDecrypt2_Prepare() 41 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_EncryptDecrypt2_Prepare() 47 rval = Tss2_MU_TPM2B_MAX_BUFFER_Marshal (inData, in Tss2_Sys_EncryptDecrypt2_Prepare() 53 if (rval) in Tss2_Sys_EncryptDecrypt2_Prepare() [all …]
|
D | Tss2_Sys_EncryptDecrypt.c | 24 TSS2_RC rval; in Tss2_Sys_EncryptDecrypt_Prepare() local 29 rval = CommonPreparePrologue(ctx, TPM2_CC_EncryptDecrypt); in Tss2_Sys_EncryptDecrypt_Prepare() 30 if (rval) in Tss2_Sys_EncryptDecrypt_Prepare() 31 return rval; in Tss2_Sys_EncryptDecrypt_Prepare() 33 rval = Tss2_MU_UINT32_Marshal(keyHandle, ctx->cmdBuffer, in Tss2_Sys_EncryptDecrypt_Prepare() 36 if (rval) in Tss2_Sys_EncryptDecrypt_Prepare() 37 return rval; in Tss2_Sys_EncryptDecrypt_Prepare() 39 rval = Tss2_MU_UINT8_Marshal(decrypt, ctx->cmdBuffer, in Tss2_Sys_EncryptDecrypt_Prepare() 42 if (rval) in Tss2_Sys_EncryptDecrypt_Prepare() 43 return rval; in Tss2_Sys_EncryptDecrypt_Prepare() [all …]
|
D | Tss2_Sys_Rewrap.c | 24 TSS2_RC rval; in Tss2_Sys_Rewrap_Prepare() local 29 rval = CommonPreparePrologue(ctx, TPM2_CC_Rewrap); in Tss2_Sys_Rewrap_Prepare() 30 if (rval) in Tss2_Sys_Rewrap_Prepare() 31 return rval; in Tss2_Sys_Rewrap_Prepare() 33 rval = Tss2_MU_UINT32_Marshal(oldParent, ctx->cmdBuffer, in Tss2_Sys_Rewrap_Prepare() 36 if (rval) in Tss2_Sys_Rewrap_Prepare() 37 return rval; in Tss2_Sys_Rewrap_Prepare() 39 rval = Tss2_MU_UINT32_Marshal(newParent, ctx->cmdBuffer, in Tss2_Sys_Rewrap_Prepare() 42 if (rval) in Tss2_Sys_Rewrap_Prepare() 43 return rval; in Tss2_Sys_Rewrap_Prepare() [all …]
|
D | Tss2_Sys_PCR_Allocate.c | 21 TSS2_RC rval; in Tss2_Sys_PCR_Allocate_Prepare() local 26 rval = ValidateTPML_PCR_SELECTION(pcrAllocation); in Tss2_Sys_PCR_Allocate_Prepare() 27 if (rval) in Tss2_Sys_PCR_Allocate_Prepare() 28 return rval; in Tss2_Sys_PCR_Allocate_Prepare() 30 rval = CommonPreparePrologue(ctx, TPM2_CC_PCR_Allocate); in Tss2_Sys_PCR_Allocate_Prepare() 31 if (rval) in Tss2_Sys_PCR_Allocate_Prepare() 32 return rval; in Tss2_Sys_PCR_Allocate_Prepare() 34 rval = Tss2_MU_UINT32_Marshal(authHandle, ctx->cmdBuffer, in Tss2_Sys_PCR_Allocate_Prepare() 37 if (rval) in Tss2_Sys_PCR_Allocate_Prepare() 38 return rval; in Tss2_Sys_PCR_Allocate_Prepare() [all …]
|
D | Tss2_Sys_Duplicate.c | 23 TSS2_RC rval; in Tss2_Sys_Duplicate_Prepare() local 28 rval = CommonPreparePrologue(ctx, TPM2_CC_Duplicate); in Tss2_Sys_Duplicate_Prepare() 29 if (rval) in Tss2_Sys_Duplicate_Prepare() 30 return rval; in Tss2_Sys_Duplicate_Prepare() 32 rval = Tss2_MU_UINT32_Marshal(objectHandle, ctx->cmdBuffer, in Tss2_Sys_Duplicate_Prepare() 35 if (rval) in Tss2_Sys_Duplicate_Prepare() 36 return rval; in Tss2_Sys_Duplicate_Prepare() 38 rval = Tss2_MU_UINT32_Marshal(newParentHandle, ctx->cmdBuffer, in Tss2_Sys_Duplicate_Prepare() 41 if (rval) in Tss2_Sys_Duplicate_Prepare() 42 return rval; in Tss2_Sys_Duplicate_Prepare() [all …]
|
D | Tss2_Sys_GetSessionAuditDigest.c | 24 TSS2_RC rval; in Tss2_Sys_GetSessionAuditDigest_Prepare() local 29 rval = CommonPreparePrologue(ctx, TPM2_CC_GetSessionAuditDigest); in Tss2_Sys_GetSessionAuditDigest_Prepare() 30 if (rval) in Tss2_Sys_GetSessionAuditDigest_Prepare() 31 return rval; in Tss2_Sys_GetSessionAuditDigest_Prepare() 33 rval = Tss2_MU_UINT32_Marshal(privacyAdminHandle, ctx->cmdBuffer, in Tss2_Sys_GetSessionAuditDigest_Prepare() 36 if (rval) in Tss2_Sys_GetSessionAuditDigest_Prepare() 37 return rval; in Tss2_Sys_GetSessionAuditDigest_Prepare() 39 rval = Tss2_MU_UINT32_Marshal(signHandle, ctx->cmdBuffer, in Tss2_Sys_GetSessionAuditDigest_Prepare() 42 if (rval) in Tss2_Sys_GetSessionAuditDigest_Prepare() 43 return rval; in Tss2_Sys_GetSessionAuditDigest_Prepare() [all …]
|
D | Tss2_Sys_Quote.c | 23 TSS2_RC rval; in Tss2_Sys_Quote_Prepare() local 28 rval = ValidateTPML_PCR_SELECTION(PCRselect); in Tss2_Sys_Quote_Prepare() 29 if (rval) in Tss2_Sys_Quote_Prepare() 30 return rval; in Tss2_Sys_Quote_Prepare() 32 rval = CommonPreparePrologue(ctx, TPM2_CC_Quote); in Tss2_Sys_Quote_Prepare() 33 if (rval) in Tss2_Sys_Quote_Prepare() 34 return rval; in Tss2_Sys_Quote_Prepare() 36 rval = Tss2_MU_UINT32_Marshal(signHandle, ctx->cmdBuffer, in Tss2_Sys_Quote_Prepare() 39 if (rval) in Tss2_Sys_Quote_Prepare() 40 return rval; in Tss2_Sys_Quote_Prepare() [all …]
|
D | Tss2_Sys_ZGen_2Phase.c | 24 TSS2_RC rval; in Tss2_Sys_ZGen_2Phase_Prepare() local 29 rval = CommonPreparePrologue(ctx, TPM2_CC_ZGen_2Phase); in Tss2_Sys_ZGen_2Phase_Prepare() 30 if (rval) in Tss2_Sys_ZGen_2Phase_Prepare() 31 return rval; in Tss2_Sys_ZGen_2Phase_Prepare() 33 rval = Tss2_MU_UINT32_Marshal(keyA, ctx->cmdBuffer, in Tss2_Sys_ZGen_2Phase_Prepare() 36 if (rval) in Tss2_Sys_ZGen_2Phase_Prepare() 37 return rval; in Tss2_Sys_ZGen_2Phase_Prepare() 42 rval = Tss2_MU_UINT16_Marshal(0, ctx->cmdBuffer, in Tss2_Sys_ZGen_2Phase_Prepare() 47 rval = Tss2_MU_TPM2B_ECC_POINT_Marshal(inQsB, ctx->cmdBuffer, in Tss2_Sys_ZGen_2Phase_Prepare() 52 if (rval) in Tss2_Sys_ZGen_2Phase_Prepare() [all …]
|
/external/tpm2-tss/test/integration/ |
D | sapi-hierarchy-change-auth.int.c | 27 UINT32 rval; in test_owner_auth() local 42 rval = Tss2_Sys_HierarchyChangeAuth( sapi_context, TPM2_RH_OWNER, &sessionsData, &newAuth, 0); in test_owner_auth() 43 if (rval != TPM2_RC_SUCCESS) { in test_owner_auth() 44 LOG_ERROR("HierarchyChangeAuth FAILED! Response Code : 0x%x", rval); in test_owner_auth() 53 rval = Tss2_Sys_HierarchyChangeAuth( sapi_context, TPM2_RH_OWNER, &sessionsData, &newAuth, 0 ); in test_owner_auth() 54 if (rval != TPM2_RC_SUCCESS) { in test_owner_auth() 55 LOG_ERROR("HierarchyChangeAuth FAILED! Response Code : 0x%x", rval); in test_owner_auth() 61 rval = Tss2_Sys_HierarchyChangeAuth( sapi_context, TPM2_RH_OWNER, &sessionsData, &newAuth, 0 ); in test_owner_auth() 62 if (rval != TPM2_RC_SUCCESS) { in test_owner_auth() 63 LOG_ERROR("HierarchyChangeAuth FAILED! Response Code : 0x%x", rval); in test_owner_auth() [all …]
|