From fb790b07aeba8e22e4190cf3e1834d11ecde6c96 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:08:33 +0200 Subject: dev: better .clang-format, ran format command. Signed-off-by: Amlal --- dev/kernel/FirmwareKit/GPT.h | 79 +++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 41 deletions(-) (limited to 'dev/kernel/FirmwareKit/GPT.h') diff --git a/dev/kernel/FirmwareKit/GPT.h b/dev/kernel/FirmwareKit/GPT.h index 55356121..7e5a910b 100644 --- a/dev/kernel/FirmwareKit/GPT.h +++ b/dev/kernel/FirmwareKit/GPT.h @@ -1,51 +1,48 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #pragma once -#include #include +#include -#define kSectorAlignGPT_PartTbl (420U) +#define kSectorAlignGPT_PartTbl (420U) #define kSectorAlignGPT_PartEntry (72U) -#define kMagicLenGPT (8U) -#define kMagicGPT ("EFI PART") // "EFI PART" -#define kGPTPartitionTableLBA (512U + sizeof(GPT_PARTITION_TABLE)) - -namespace Kernel -{ - struct GPT_PARTITION_TABLE; - struct GPT_PARTITION_ENTRY; - - struct PACKED GPT_PARTITION_TABLE final - { - Char Signature[kMagicLenGPT]; - UInt32 Revision; - UInt32 HeaderSize; - UInt32 CRC32; - UInt32 Reserved1; - UInt64 LBAHeader; - UInt64 LBAAltHeader; - UInt64 FirstGPTEntry; - UInt64 LastGPTEntry; - EfiGUID Guid; - UInt64 StartingLBA; - UInt32 NumPartitionEntries; - UInt32 SizeOfEntries; - UInt32 CRC32PartEntry; - UInt8 Reserved2[kSectorAlignGPT_PartTbl]; - }; - - struct PACKED GPT_PARTITION_ENTRY - { - EfiGUID PartitionTypeGUID; - EfiGUID UniquePartitionGUID; - UInt64 StartLBA; - UInt64 EndLBA; - UInt64 Attributes; - UInt8 Name[kSectorAlignGPT_PartEntry]; - }; -} // namespace Kernel +#define kMagicLenGPT (8U) +#define kMagicGPT ("EFI PART") // "EFI PART" +#define kGPTPartitionTableLBA (512U + sizeof(GPT_PARTITION_TABLE)) + +namespace Kernel { +struct GPT_PARTITION_TABLE; +struct GPT_PARTITION_ENTRY; + +struct PACKED GPT_PARTITION_TABLE final { + Char Signature[kMagicLenGPT]; + UInt32 Revision; + UInt32 HeaderSize; + UInt32 CRC32; + UInt32 Reserved1; + UInt64 LBAHeader; + UInt64 LBAAltHeader; + UInt64 FirstGPTEntry; + UInt64 LastGPTEntry; + EfiGUID Guid; + UInt64 StartingLBA; + UInt32 NumPartitionEntries; + UInt32 SizeOfEntries; + UInt32 CRC32PartEntry; + UInt8 Reserved2[kSectorAlignGPT_PartTbl]; +}; + +struct PACKED GPT_PARTITION_ENTRY { + EfiGUID PartitionTypeGUID; + EfiGUID UniquePartitionGUID; + UInt64 StartLBA; + UInt64 EndLBA; + UInt64 Attributes; + UInt8 Name[kSectorAlignGPT_PartEntry]; +}; +} // namespace Kernel -- cgit v1.2.3