Skip to content

Conversation

@HuijingHei
Copy link
Contributor

@bootc-bot bootc-bot bot requested a review from jmarrero November 17, 2025 07:18
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces functionality to locate the EFI System Partition (ESP) on both MBR and GPT partitioned disks. This is achieved by adding constants for the respective partition identifiers and a new method, find_partition_of_esp, to the PartitionTable struct. The implementation is accompanied by comprehensive tests covering both MBR (dos) and GPT scenarios, ensuring the new logic is robust. My review found the changes to be functionally correct and well-tested, with one suggestion to improve code reuse and maintainability in the new method.

pub const ESP_ID_MBR: &[&str] = &["6", "ef"];

/// EFI System Partition (ESP) for UEFI boot on GPT
pub const ESP_ID_GPT: &str = "c12a7328-f81f-11d2-ba4b-00a0c93ec93b";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have this one the DPS spec too as pub const ESP

Copy link
Contributor Author

@HuijingHei HuijingHei Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, simply do not want this to include more dependency, so I copy it from DPS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this to ESP too.

@HuijingHei HuijingHei force-pushed the find-esp-partition branch 2 times, most recently from e09478b to 4226224 Compare November 18, 2025 06:47
@cgwalters
Copy link
Collaborator

Very minor make validate failure

See bootc-dev#1736 (comment)

Signed-off-by: Huijing Hei <hhei@redhat.com>
@HuijingHei
Copy link
Contributor Author

Very minor make validate failure

Updated, thank you for the kind review!

@cgwalters cgwalters enabled auto-merge (rebase) November 19, 2025 01:23
@cgwalters cgwalters merged commit e24660f into bootc-dev:main Nov 19, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants