Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
7cdc7386
Commit
7cdc7386
authored
Jan 08, 2021
by
longpanda
Browse files
Fix a bug when use workaround for Legacy BIOS access limitation with GPT partition style
parent
44bb72ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
+18
-5
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
View file @
7cdc7386
...
@@ -1771,6 +1771,18 @@ int ventoy_check_device(grub_device_t dev)
...
@@ -1771,6 +1771,18 @@ int ventoy_check_device(grub_device_t dev)
}
}
if
(
workaround
)
if
(
workaround
)
{
if
(
grub_strncmp
(
g_ventoy_part_info
->
Head
.
Signature
,
"EFI PART"
,
8
)
==
0
)
{
ventoy_gpt_part_tbl
*
PartTbl
=
g_ventoy_part_info
->
PartTbl
;
if
(
PartTbl
[
1
].
StartLBA
!=
PartTbl
[
0
].
LastLBA
+
1
||
(
PartTbl
[
1
].
LastLBA
+
1
-
PartTbl
[
1
].
StartLBA
)
!=
65536
)
{
grub_file_close
(
file
);
return
ventoy_check_device_result
(
6
);
}
}
else
{
{
ventoy_part_table
*
PartTbl
=
g_ventoy_part_info
->
MBR
.
PartTbl
;
ventoy_part_table
*
PartTbl
=
g_ventoy_part_info
->
MBR
.
PartTbl
;
if
(
PartTbl
[
1
].
StartSectorId
!=
PartTbl
[
0
].
StartSectorId
+
PartTbl
[
0
].
SectorCount
||
if
(
PartTbl
[
1
].
StartSectorId
!=
PartTbl
[
0
].
StartSectorId
+
PartTbl
[
0
].
SectorCount
||
...
@@ -1780,6 +1792,7 @@ int ventoy_check_device(grub_device_t dev)
...
@@ -1780,6 +1792,7 @@ int ventoy_check_device(grub_device_t dev)
return
ventoy_check_device_result
(
6
);
return
ventoy_check_device_result
(
6
);
}
}
}
}
}
else
else
{
{
offset
=
partition
->
start
+
partition
->
len
;
offset
=
partition
->
start
+
partition
->
len
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment