From a6765d4dfbb91229f8b6be6ef8fca0f33c35ac95 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Mon, 22 Feb 2021 14:58:33 -0500 Subject: [PATCH] rev164: Rename unmarshal/marhsalArray to Unmarshal/MarshalArray Signed-off-by: Stefan Berger --- src/tpm2/CommandDispatchData.h | 10 +++++----- src/tpm2/CommandDispatcher.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/tpm2/CommandDispatchData.h b/src/tpm2/CommandDispatchData.h index 84042fcb..b11096c9 100644 --- a/src/tpm2/CommandDispatchData.h +++ b/src/tpm2/CommandDispatchData.h @@ -3,7 +3,7 @@ /* Command DIspatch Data */ /* Written by Ken Goldman */ /* IBM Thomas J. Watson Research Center */ -/* $Id: CommandDispatchData.h 1635 2020-06-12 21:48:27Z kgoldman $ */ +/* $Id: CommandDispatchData.h 1658 2021-01-22 23:14:01Z kgoldman $ */ /* */ /* Licenses and Notices */ /* */ @@ -55,7 +55,7 @@ /* arising in any way out of use or reliance upon this specification or any */ /* information herein. */ /* */ -/* (c) Copyright IBM Corp. and others, 2016 - 2020 */ +/* (c) Copyright IBM Corp. and others, 2016 - 2021 */ /* */ /********************************************************************************/ @@ -81,7 +81,7 @@ # define _MARSHAL_T_ MARSHAL_t #endif -const _UNMARSHAL_T_ UnmarshalArray[] = { +const _UNMARSHAL_T_ unmarshalArray[] = { #define TPMI_DH_CONTEXT_H_UNMARSHAL 0 UNMARSHAL_DISPATCH(TPMI_DH_CONTEXT), #define TPMI_RH_AC_H_UNMARSHAL (TPMI_DH_CONTEXT_H_UNMARSHAL + 1) @@ -262,8 +262,8 @@ const _UNMARSHAL_T_ UnmarshalArray[] = { }; -const _MARSHAL_T_ MarshalArray[] = { - +const _MARSHAL_T_ marshalArray[] = { + #define UINT32_H_MARSHAL 0 MARSHAL_DISPATCH(UINT32), // RESPONSE_PARAMETER_FIRST_TYPE marks the end of the response handles. diff --git a/src/tpm2/CommandDispatcher.c b/src/tpm2/CommandDispatcher.c index a96823b9..c0464b95 100644 --- a/src/tpm2/CommandDispatcher.c +++ b/src/tpm2/CommandDispatcher.c @@ -3,7 +3,7 @@ /* Command Dispatcher */ /* Written by Ken Goldman */ /* IBM Thomas J. Watson Research Center */ -/* $Id: CommandDispatcher.c 1519 2019-11-15 20:43:51Z kgoldman $ */ +/* $Id: CommandDispatcher.c 1658 2021-01-22 23:14:01Z kgoldman $ */ /* */ /* Licenses and Notices */ /* */ @@ -55,7 +55,7 @@ /* arising in any way out of use or reliance upon this specification or any */ /* information herein. */ /* */ -/* (c) Copyright IBM Corp. and others, 2016 - 2019 */ +/* (c) Copyright IBM Corp. and others, 2016 - 2021 */ /* */ /********************************************************************************/ @@ -153,7 +153,7 @@ ParseHandleBuffer( { #if TABLE_DRIVEN_MARSHAL marshalIndex_t index; - index = UnmarshalArray[dType] | ((type & 0x80) ? NULL_FLAG : 0); + index = unmarshalArray[dType] | ((type & 0x80) ? NULL_FLAG : 0); result = Unmarshal(index, &(command->handles[command->handleNum]), &command->parameterBuffer, &command->parameterSize); @@ -163,7 +163,7 @@ ParseHandleBuffer( if(dType < HANDLE_FIRST_FLAG_TYPE) { // Look up the function to do the unmarshaling - NoFlagFunction *f = (NoFlagFunction *)UnmarshalArray[dType]; + NoFlagFunction *f = (NoFlagFunction *)unmarshalArray[dType]; // call it result = f(&(command->handles[command->handleNum]), &command->parameterBuffer, @@ -172,7 +172,7 @@ ParseHandleBuffer( else { // Look up the function - FlagFunction *f = UnmarshalArray[dType]; + FlagFunction *f = unmarshalArray[dType]; // Call it setting the flag to the appropriate value result = f(&(command->handles[command->handleNum]), &command->parameterBuffer, @@ -302,7 +302,7 @@ CommandDispatcher( pNum++; #if TABLE_DRIVEN_MARSHAL { - marshalIndex_t index = UnmarshalArray[dType]; + marshalIndex_t index = unmarshalArray[dType]; index |= (type & 0x80) ? NULL_FLAG : 0; result = Unmarshal(index, &commandIn[offset], &command->parameterBuffer, &command->parameterSize); @@ -310,13 +310,13 @@ CommandDispatcher( #else if(dType < PARAMETER_FIRST_FLAG_TYPE) { - NoFlagFunction *f = (NoFlagFunction *)UnmarshalArray[dType]; + NoFlagFunction *f = (NoFlagFunction *)unmarshalArray[dType]; result = f(&commandIn[offset], &command->parameterBuffer, &command->parameterSize); } else { - FlagFunction *f = UnmarshalArray[dType]; + FlagFunction *f = unmarshalArray[dType]; result = f(&commandIn[offset], &command->parameterBuffer, &command->parameterSize, (type & 0x80) != 0); @@ -390,12 +390,12 @@ CommandDispatcher( && !g_inFailureMode; type = *types++) { #if TABLE_DRIVEN_MARSHAL - marshalIndex_t index = MarshalArray[dType]; + marshalIndex_t index = marshalArray[dType]; command->parameterSize += Marshal(index, &commandOut[offset], &command->responseBuffer, &maxOutSize); #else - const MARSHAL_t f = MarshalArray[dType]; + const MARSHAL_t f = marshalArray[dType]; command->parameterSize += f(&commandOut[offset], &command->responseBuffer, &maxOutSize); #endif