gpt_parse() - Read and validate the GPT from the boot disk. @partitions: Output array for parsed partitions. @max_count: Maximum number of entries @partitions can hold. @count: Output: number of valid (non-empty) partition entries found.
Reads LBA 1 (GPT header), validates the "EFI PART" signature and revision, then iterates the partition entry table (default: LBA 2-33) and populates @partitions with all non-empty entries, up to @max_count.
- Returns
- : 0 on success, -1 if the signature is invalid or an I/O error occurs.