clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I07372e75f12f406bd0555dd27e249bc7dd0958d4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/cryptsetupInterface.hpp b/include/cryptsetupInterface.hpp
index fb03a8b..4f824cd 100644
--- a/include/cryptsetupInterface.hpp
+++ b/include/cryptsetupInterface.hpp
@@ -63,12 +63,10 @@
*
* @returns allocated key slot number or negative errno otherwise.
*/
- virtual int cryptKeyslotChangeByPassphrase(struct crypt_device* cd,
- int keyslotOld, int keyslotNew,
- const char* passphrase,
- size_t passphraseSize,
- const char* newPassphrase,
- size_t newPassphraseSize) = 0;
+ virtual int cryptKeyslotChangeByPassphrase(
+ struct crypt_device* cd, int keyslotOld, int keyslotNew,
+ const char* passphrase, size_t passphraseSize,
+ const char* newPassphrase, size_t newPassphraseSize) = 0;
/** @brief Wrapper around crypt_keyslot_add_by_volume_key.
* @details Used for mocking purposes.
@@ -83,11 +81,10 @@
*
* @returns allocated key slot number or negative errno otherwise.
*/
- virtual int cryptKeyslotAddByVolumeKey(struct crypt_device* cd, int keyslot,
- const char* volumeKey,
- size_t volumeKeySize,
- const char* passphrase,
- size_t passphraseSize) = 0;
+ virtual int cryptKeyslotAddByVolumeKey(
+ struct crypt_device* cd, int keyslot, const char* volumeKey,
+ size_t volumeKeySize, const char* passphrase,
+ size_t passphraseSize) = 0;
/** @brief Wrapper around crypt_load.
* @details Used for mocking purposes.
@@ -114,11 +111,9 @@
*
* @returns unlocked key slot number or negative errno otherwise.
*/
- virtual int cryptActivateByPassphrase(struct crypt_device* cd,
- const char* name, int keyslot,
- const char* passphrase,
- size_t passphraseSize,
- uint32_t flags) = 0;
+ virtual int cryptActivateByPassphrase(
+ struct crypt_device* cd, const char* name, int keyslot,
+ const char* passphrase, size_t passphraseSize, uint32_t flags) = 0;
/** @brief Wrapper around crypt_deactivate.
* @details Used for mocking purposes.
@@ -159,8 +154,8 @@
*
* @return value defined by crypt_keyslot_info
*/
- virtual crypt_keyslot_info cryptKeySlotStatus(struct crypt_device* cd,
- int keyslot) = 0;
+ virtual crypt_keyslot_info
+ cryptKeySlotStatus(struct crypt_device* cd, int keyslot) = 0;
/** @brief Wrapper around crypt_get_dir.
* @details Used for mocking purposes.
@@ -193,11 +188,10 @@
volumeKeySize, params);
}
- int cryptKeyslotChangeByPassphrase(struct crypt_device* cd, int keyslotOld,
- int keyslotNew, const char* passphrase,
- size_t passphraseSize,
- const char* newPassphrase,
- size_t newPassphraseSize) override
+ int cryptKeyslotChangeByPassphrase(
+ struct crypt_device* cd, int keyslotOld, int keyslotNew,
+ const char* passphrase, size_t passphraseSize,
+ const char* newPassphrase, size_t newPassphraseSize) override
{
return crypt_keyslot_change_by_passphrase(
cd, keyslotOld, keyslotNew, passphrase, passphraseSize,
@@ -219,10 +213,9 @@
return crypt_load(cd, requestedType, params);
}
- int cryptActivateByPassphrase(struct crypt_device* cd, const char* name,
- int keyslot, const char* passphrase,
- size_t passphraseSize,
- uint32_t flags) override
+ int cryptActivateByPassphrase(
+ struct crypt_device* cd, const char* name, int keyslot,
+ const char* passphrase, size_t passphraseSize, uint32_t flags) override
{
return crypt_activate_by_passphrase(cd, name, keyslot, passphrase,
passphraseSize, flags);