fix struct and variable case styles
Fix the following clang-tidy warnings:
```
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/include/sanitize.hpp:41:37: error: invalid case style for struct 'mmc_io_multi_cmd_erase' [readability-identifier-naming,-warnings-as-errors]
41 | struct mmc_io_multi_cmd_erase data) = 0;
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:48:30: error: invalid case style for parameter 'cipher_mode' [readability-identifier-naming,-warnings-as-errors]
48 | const char* cipher_mode, const char* uuid,
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:30: error: invalid case style for parameter 'volume_key' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:49:49: error: invalid case style for parameter 'volume_key_size' [readability-identifier-naming,-warnings-as-errors]
49 | const char* volume_key, size_t volume_key_size, void* params),
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:55:25: error: invalid case style for parameter 'passphrase_size' [readability-identifier-naming,-warnings-as-errors]
/data0/jenkins/workspace/ci-repository/openbmc/estoraged/src/test/include/estoraged_test.hpp:59:56: error: invalid case style for parameter 'requested_type' [readability-identifier-naming,-warnings-as-errors]
59 | (struct crypt_device * cd, const char* requested_type,
```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib4c685db2037514b0517e42369b1d66b49b00e03
diff --git a/include/cryptsetupInterface.hpp b/include/cryptsetupInterface.hpp
index 4f824cd..f537a0f 100644
--- a/include/cryptsetupInterface.hpp
+++ b/include/cryptsetupInterface.hpp
@@ -36,11 +36,11 @@
* @param[in] type - type of device (optional params struct must be of
* this type).
* @param[in] cipher - (e.g. "aes").
- * @params[in cipher_mode - including IV specification (e.g. "xts-plain").
+ * @params[in cipherMode - including IV specification (e.g. "xts-plain").
* @params[in] uuid - requested UUID or NULL if it should be generated.
- * @params[in] volume_key - pre-generated volume key or NULL if it should
+ * @params[in] volumeKey - pre-generated volume key or NULL if it should
* be generated (only for LUKS).
- * @params[in] volume_key_size - size of volume key in bytes.
+ * @params[in] volumeKeySize - size of volume key in bytes.
* @params[in] params - crypt type specific parameters.
*
* @returns 0 on success or negative errno value otherwise.
@@ -68,16 +68,16 @@
const char* passphrase, size_t passphraseSize,
const char* newPassphrase, size_t newPassphraseSize) = 0;
- /** @brief Wrapper around crypt_keyslot_add_by_volume_key.
+ /** @brief Wrapper around crypt_keyslot_add_by_volumeKey.
* @details Used for mocking purposes.
*
* @param[in] cd - crypt device handle.
* @param[in] keyslot - requested keyslot or CRYPT_ANY_SLOT.
- * @param[in] volume_key - provided volume key or NULL if used after
+ * @param[in] volumeKey - provided volume key or NULL if used after
* crypt_format.
- * @param[in] volume_key_size - size of volume_key.
+ * @param[in] volumeKeySize - size of volumeKey.
* @param[in] passphrase - passphrase for new keyslot.
- * @param[in] passphrase_size - size of passphrase.
+ * @param[in] passphraseSize - size of passphrase.
*
* @returns allocated key slot number or negative errno otherwise.
*/
@@ -90,7 +90,7 @@
* @details Used for mocking purposes.
*
* @param[in] cd - crypt device handle.
- * @param[in] requested_type - crypt-type or NULL for all known.
+ * @param[in] requestedType - crypt-type or NULL for all known.
* @param[in] params - crypt type specific parameters (see crypt-type).
*
* @returns 0 on success or negative errno value otherwise.
@@ -106,7 +106,7 @@
* passphrase.
* @param[in] keyslot - requested keyslot to check or CRYPT_ANY_SLOT.
* @param[in] passphrase - passphrase used to unlock volume key.
- * @param[in] passphrase_size - size of passphrase.
+ * @param[in] passphraseSize - size of passphrase.
* @param[in] flags - activation flags.
*
* @returns unlocked key slot number or negative errno otherwise.
diff --git a/include/sanitize.hpp b/include/sanitize.hpp
index 48b49aa..f7fe2a1 100644
--- a/include/sanitize.hpp
+++ b/include/sanitize.hpp
@@ -38,7 +38,7 @@
* @param[in] mmc_io_mutli_cmd - many eMMC cmd
*/
virtual int doIoctlMulti(std::string_view devPath, unsigned long request,
- struct mmc_io_multi_cmd_erase data) = 0;
+ struct MmcIoMultiCmdErase data) = 0;
virtual ~IOCTLWrapperInterface() = default;
IOCTLWrapperInterface() = default;
@@ -56,7 +56,7 @@
int doIoctl(std::string_view devPath, unsigned long request,
struct mmc_ioc_cmd data) override;
int doIoctlMulti(std::string_view devPath, unsigned long request,
- struct mmc_io_multi_cmd_erase data) override;
+ struct MmcIoMultiCmdErase data) override;
~IOCTLWrapperImpl() override = default;
IOCTLWrapperImpl() = default;
@@ -113,7 +113,7 @@
// can't use the real mmc_ioc_multi_cmd b/c of zero length array
// see uapi/linux/mmc/ioctl.h
-struct mmc_io_multi_cmd_erase
+struct MmcIoMultiCmdErase
{
uint64_t num_of_cmds;
struct mmc_ioc_cmd cmds[3]; // NOLINT (c arrays usage)