mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
When loader tries to open GPT partition, but partition table is not GPT,
then try automatically detect an appropriate partition type. PR: kern/172550 Tested by: Ralf Wenk
This commit is contained in:
parent
ab42d234d1
commit
f06e6159c3
@ -310,6 +310,13 @@ opened:
|
|||||||
if (ptable_gettype(od->table) == PTABLE_GPT) {
|
if (ptable_gettype(od->table) == PTABLE_GPT) {
|
||||||
partition = 255;
|
partition = 255;
|
||||||
goto out; /* Nothing more to do */
|
goto out; /* Nothing more to do */
|
||||||
|
} else if (partition == 255) {
|
||||||
|
/*
|
||||||
|
* When we try to open GPT partition, but partition
|
||||||
|
* table isn't GPT, reset d_partition value to -1
|
||||||
|
* and try to autodetect appropriate value.
|
||||||
|
*/
|
||||||
|
partition = -1;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* If d_partition < 0 and we are looking at a BSD slice,
|
* If d_partition < 0 and we are looking at a BSD slice,
|
||||||
|
Loading…
Reference in New Issue
Block a user