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
529541f2
Unverified
Commit
529541f2
authored
Jul 20, 2023
by
Jianfeng Liu
Committed by
GitHub
Jul 20, 2023
Browse files
fix Synchronous Exception on some arm cpus (#2488)
parent
430f81ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
+3
-1
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
View file @
529541f2
...
@@ -342,10 +342,12 @@ grub_file_read (grub_file_t file, void *buf, grub_size_t len)
...
@@ -342,10 +342,12 @@ grub_file_read (grub_file_t file, void *buf, grub_size_t len)
if
(
len
==
0
)
if
(
len
==
0
)
return
0
;
return
0
;
if
(
grub_strncmp
(
file
->
name
,
GRUB_MEMFILE_MEM
,
grub_strlen
(
GRUB_MEMFILE_MEM
))
==
0
)
{
if
(
file
->
name
)
{
if
(
grub_strncmp
(
file
->
name
,
GRUB_MEMFILE_MEM
,
grub_strlen
(
GRUB_MEMFILE_MEM
))
==
0
)
{
grub_memcpy
(
buf
,
(
grub_uint8_t
*
)(
file
->
data
)
+
file
->
offset
,
len
);
grub_memcpy
(
buf
,
(
grub_uint8_t
*
)(
file
->
data
)
+
file
->
offset
,
len
);
file
->
offset
+=
len
;
file
->
offset
+=
len
;
return
len
;
return
len
;
}
}
}
read_hook
=
file
->
read_hook
;
read_hook
=
file
->
read_hook
;
...
...
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