mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Partition Table: Allow to boot with a partition number higher than 4
This is true currently only to GUID partitions, Booting with an MBR partition is still limited to partition numbers 1-4.
This commit is contained in:
parent
a3113721d4
commit
5d760bf172
Notes:
sideshowbarker
2024-07-19 09:43:39 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/5d760bf1722 Pull-request: https://github.com/SerenityOS/serenity/pull/1156
1 changed files with 4 additions and 5 deletions
|
@ -251,11 +251,6 @@ void init_stage2()
|
|||
hang();
|
||||
}
|
||||
|
||||
if (partition_number < 1 || partition_number > 4) {
|
||||
kprintf("init_stage2: invalid partition number %d; expected 1 to 4\n", partition_number);
|
||||
hang();
|
||||
}
|
||||
|
||||
MBRPartitionTable mbr(root_dev);
|
||||
|
||||
if (!mbr.initialize()) {
|
||||
|
@ -278,6 +273,10 @@ void init_stage2()
|
|||
root_dev = *partition;
|
||||
} else {
|
||||
dbgprintf("MBR Partitioned Storage Detected!\n");
|
||||
if (partition_number < 1 || partition_number > 4) {
|
||||
kprintf("init_stage2: invalid partition number %d; expected 1 to 4\n", partition_number);
|
||||
hang();
|
||||
}
|
||||
auto partition = mbr.partition(partition_number);
|
||||
if (!partition) {
|
||||
kprintf("init_stage2: couldn't get partition %d\n", partition_number);
|
||||
|
|
Loading…
Reference in a new issue