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
32bcd8f8
"vscode:/vscode.git/clone" did not exist on "ccefe051a08fee6aa8bf97742cfb406abe6618c5"
Commit
32bcd8f8
authored
Apr 01, 2021
by
longpanda
Browse files
Clear input key before show main menu
parent
26c1756e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
+30
-0
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
View file @
32bcd8f8
...
...
@@ -3461,6 +3461,35 @@ static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, in
}
#endif
static
grub_err_t
ventoy_cmd_clear_key
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
)
{
int
i
;
int
ret
;
(
void
)
ctxt
;
(
void
)
argc
;
(
void
)
args
;
for
(
i
=
0
;
i
<
500
;
i
++
)
{
ret
=
grub_getkey_noblock
();
if
(
ret
==
GRUB_TERM_NO_KEY
)
{
break
;
}
}
if
(
i
>=
500
)
{
grub_cls
();
grub_printf
(
"
\n\n
Still have key input after clear.
\n
"
);
grub_refresh
();
grub_sleep
(
5
);
}
return
0
;
}
static
grub_err_t
ventoy_cmd_acpi_param
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
)
{
int
i
;
...
...
@@ -4341,6 +4370,7 @@ static cmd_para ventoy_cmds[] =
{
"vt_img_unhook_root"
,
ventoy_cmd_img_unhook_root
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_acpi_param"
,
ventoy_cmd_acpi_param
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_check_secureboot_var"
,
ventoy_cmd_check_secureboot_var
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_clear_key"
,
ventoy_cmd_clear_key
,
0
,
NULL
,
""
,
""
,
NULL
},
};
...
...
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