From 48e555857f81b9dcfe1ccfe7a47adde40f1f2c00 Mon Sep 17 00:00:00 2001 From: Richard Marian Thomaiyar Date: Thu, 20 Dec 2018 15:58:04 +0530 Subject: Change struct names to UpperCamelCase Change struct names to UpperCamelCase to align with OpenBMC coding guidelines Change-Id: Ib71768be45e57556a26b14b64adec98db3bc7762 Signed-off-by: Richard Marian Thomaiyar --- user_channel/channelcommands.cpp | 30 +++++++++++++++--------------- user_channel/passwd_mgr.cpp | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp index a0caeb6..fd46837 100644 --- a/user_channel/channelcommands.cpp +++ b/user_channel/channelcommands.cpp @@ -27,11 +27,11 @@ using namespace phosphor::logging; namespace ipmi { -/** @struct setChannelAccessReq +/** @struct SetChannelAccessReq * * Structure for set channel access request command (refer spec sec 22.22) */ -struct setChannelAccessReq +struct SetChannelAccessReq { #if BYTE_ORDER == LITTLE_ENDIAN uint8_t chNum : 4; @@ -60,11 +60,11 @@ struct setChannelAccessReq } __attribute__((packed)); -/** @struct getChannelAccessReq +/** @struct GetChannelAccessReq * * Structure for get channel access request command (refer spec sec 22.23) */ -struct getChannelAccessReq +struct GetChannelAccessReq { #if BYTE_ORDER == LITTLE_ENDIAN uint8_t chNum : 4; @@ -80,11 +80,11 @@ struct getChannelAccessReq #endif } __attribute__((packed)); -/** @struct getChannelAccessResp +/** @struct GetChannelAccessResp * * Structure for get channel access response command (refer spec sec 22.23) */ -struct getChannelAccessResp +struct GetChannelAccessResp { #if BYTE_ORDER == LITTLE_ENDIAN uint8_t accessMode : 3; @@ -106,11 +106,11 @@ struct getChannelAccessResp #endif } __attribute__((packed)); -/** @struct getChannelInfoReq +/** @struct GetChannelInfoReq * * Structure for get channel info request command (refer spec sec 22.24) */ -struct getChannelInfoReq +struct GetChannelInfoReq { #if BYTE_ORDER == LITTLE_ENDIAN uint8_t chNum : 4; @@ -122,11 +122,11 @@ struct getChannelInfoReq #endif } __attribute__((packed)); -/** @struct getChannelInfoResp +/** @struct GetChannelInfoResp * * Structure for get channel info response command (refer spec sec 22.24) */ -struct getChannelInfoResp +struct GetChannelInfoResp { #if BYTE_ORDER == LITTLE_ENDIAN uint8_t chNum : 4; @@ -158,7 +158,7 @@ ipmi_ret_t ipmiSetChannelAccess(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_data_len_t data_len, ipmi_context_t context) { - const setChannelAccessReq* req = static_cast(request); + const SetChannelAccessReq* req = static_cast(request); size_t reqLength = *data_len; *data_len = 0; @@ -263,7 +263,7 @@ ipmi_ret_t ipmiGetChannelAccess(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_data_len_t data_len, ipmi_context_t context) { - const getChannelAccessReq* req = static_cast(request); + const GetChannelAccessReq* req = static_cast(request); size_t reqLength = *data_len; *data_len = 0; @@ -293,7 +293,7 @@ ipmi_ret_t ipmiGetChannelAccess(ipmi_netfn_t netfn, ipmi_cmd_t cmd, return IPMI_CC_ACTION_NOT_SUPPORTED_FOR_CHANNEL; } - getChannelAccessResp* resp = static_cast(response); + GetChannelAccessResp* resp = static_cast(response); std::fill(reinterpret_cast(resp), reinterpret_cast(resp) + sizeof(*resp), 0); @@ -329,7 +329,7 @@ ipmi_ret_t ipmiGetChannelInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_request_t request, ipmi_response_t response, ipmi_data_len_t data_len, ipmi_context_t context) { - const getChannelInfoReq* req = static_cast(request); + const GetChannelInfoReq* req = static_cast(request); size_t reqLength = *data_len; *data_len = 0; @@ -355,7 +355,7 @@ ipmi_ret_t ipmiGetChannelInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd, return IPMI_CC_PARM_OUT_OF_RANGE; } - getChannelInfoResp* resp = static_cast(response); + GetChannelInfoResp* resp = static_cast(response); std::fill(reinterpret_cast(resp), reinterpret_cast(resp) + sizeof(*resp), 0); diff --git a/user_channel/passwd_mgr.cpp b/user_channel/passwd_mgr.cpp index c47bc6d..d4ff39f 100644 --- a/user_channel/passwd_mgr.cpp +++ b/user_channel/passwd_mgr.cpp @@ -49,7 +49,7 @@ static inline size_t blockRound(size_t odd, size_t blk) /* * Meta data struct for encrypted password file */ -struct metaPassStruct +struct MetaPassStruct { char signature[10]; unsigned char reseved[2]; @@ -278,7 +278,7 @@ int PasswdMgr::readPasswdFileData(std::vector& outBytes) } // verify the signature first - metaPassStruct* metaData = reinterpret_cast(input.data()); + MetaPassStruct* metaData = reinterpret_cast(input.data()); if (std::strncmp(metaData->signature, META_PASSWD_SIG, sizeof(metaData->signature))) { @@ -508,7 +508,7 @@ int PasswdMgr::updatePasswdSpecialFile(const std::string& userName, OPENSSL_cleanse(key.data(), keyLen); // Update the meta password structure. - metaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0}; + MetaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0}; metaData.hashSize = hashLen; metaData.ivSize = ivLen; metaData.dataSize = bytesWritten; -- cgit v1.2.1