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
6c113880
Commit
6c113880
authored
Aug 02, 2021
by
longpanda
Browse files
Fixed the boot issue for "StorageCraft Recovery Environment CrossPlatform" in UEFI mode.
parent
e2656c28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c
+18
-0
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c
View file @
6c113880
...
@@ -333,7 +333,9 @@ end:
...
@@ -333,7 +333,9 @@ end:
static
grub_err_t
ventoy_grub_cfg_initrd_collect
(
const
char
*
fileName
)
static
grub_err_t
ventoy_grub_cfg_initrd_collect
(
const
char
*
fileName
)
{
{
int
i
=
0
;
int
i
=
0
;
int
len
=
0
;
int
dollar
=
0
;
int
dollar
=
0
;
int
quotation
=
0
;
grub_file_t
file
=
NULL
;
grub_file_t
file
=
NULL
;
char
*
buf
=
NULL
;
char
*
buf
=
NULL
;
char
*
start
=
NULL
;
char
*
start
=
NULL
;
...
@@ -382,6 +384,12 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
...
@@ -382,6 +384,12 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
start
++
;
start
++
;
}
}
if
(
*
start
==
'"'
)
{
quotation
=
1
;
start
++
;
}
while
(
*
start
)
while
(
*
start
)
{
{
img
=
grub_zalloc
(
sizeof
(
initrd_info
));
img
=
grub_zalloc
(
sizeof
(
initrd_info
));
...
@@ -400,6 +408,16 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
...
@@ -400,6 +408,16 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
}
}
}
}
if
(
quotation
)
{
len
=
(
int
)
grub_strlen
(
img
->
name
);
if
(
len
>
2
&&
img
->
name
[
len
-
1
]
==
'"'
)
{
img
->
name
[
len
-
1
]
=
0
;
}
debug
(
"Remove quotation <%s>
\n
"
,
img
->
name
);
}
if
(
dollar
==
1
||
ventoy_find_initrd_by_name
(
g_initrd_img_list
,
img
->
name
))
if
(
dollar
==
1
||
ventoy_find_initrd_by_name
(
g_initrd_img_list
,
img
->
name
))
{
{
grub_free
(
img
);
grub_free
(
img
);
...
...
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