[USETUP] Simplify partition creation UI code (#5837)

Unify CREATE_{PRIMARY,EXTENDED,LOGICAL}_PARTITION_PAGE
(i.e. Create{Primary,Extended,Logical}PartitionPage() functions)
into a single CREATE_PARTITION_PAGE (i.e. CreatePartitionPage()).

A lot of code was duplicated there (display, size input, etc.) just
for calling ultimately the Create{Primary,Extended,Logical}Partition()
helper functions.

This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
This commit is contained in:
Hermès Bélusca-Maïto 2023-10-24 22:01:45 +02:00
parent 1899a09399
commit 06e4f13653
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 49 additions and 265 deletions

View file

@ -94,9 +94,7 @@ typedef enum _PAGE_NUMBER
LAYOUT_SETTINGS_PAGE,
SELECT_PARTITION_PAGE,
CREATE_PRIMARY_PARTITION_PAGE,
CREATE_EXTENDED_PARTITION_PAGE,
CREATE_LOGICAL_PARTITION_PAGE,
CREATE_PARTITION_PAGE,
CHANGE_SYSTEM_PARTITION,
CONFIRM_DELETE_SYSTEM_PARTITION_PAGE,
DELETE_PARTITION_PAGE,