Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
dccefc52
Commit
dccefc52
authored
Feb 02, 2021
by
longpanda
Browse files
Support Lenovo BIOS Update CD (#729)
parent
66d5946b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
+13
-0
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
View file @
dccefc52
...
@@ -2266,6 +2266,7 @@ int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector)
...
@@ -2266,6 +2266,7 @@ int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector)
int
i
;
int
i
;
int
x86count
=
0
;
int
x86count
=
0
;
grub_uint8_t
buf
[
512
];
grub_uint8_t
buf
[
512
];
grub_uint8_t
parttype
[]
=
{
0x04
,
0x06
,
0x0B
,
0x0C
};
grub_file_seek
(
file
,
sector
*
2048
);
grub_file_seek
(
file
,
sector
*
2048
);
grub_file_read
(
file
,
buf
,
sizeof
(
buf
));
grub_file_read
(
file
,
buf
,
sizeof
(
buf
));
...
@@ -2296,6 +2297,18 @@ int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector)
...
@@ -2296,6 +2297,18 @@ int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector)
}
}
}
}
if
(
x86count
&&
buf
[
32
]
==
0x88
&&
buf
[
33
]
==
0x04
)
{
for
(
i
=
0
;
i
<
(
int
)(
ARRAY_SIZE
(
parttype
));
i
++
)
{
if
(
buf
[
36
]
==
parttype
[
i
])
{
debug
(
"hard disk image assume %s efi eltorito, part type 0x%x
\n
"
,
file
->
name
,
buf
[
36
]);
return
1
;
}
}
}
debug
(
"%s does not contain efi eltorito
\n
"
,
file
->
name
);
debug
(
"%s does not contain efi eltorito
\n
"
,
file
->
name
);
return
0
;
return
0
;
}
}
...
...
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