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
3dd3b7d2
Commit
3dd3b7d2
authored
Feb 05, 2021
by
longpanda
Browse files
Print a tip when enumerating image files.
parent
6ded3355
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.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
+18
-0
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
View file @
3dd3b7d2
...
@@ -123,6 +123,10 @@ static int g_video_mode_max = 0;
...
@@ -123,6 +123,10 @@ static int g_video_mode_max = 0;
static
int
g_video_mode_num
=
0
;
static
int
g_video_mode_num
=
0
;
static
ventoy_video_mode
*
g_video_mode_list
=
NULL
;
static
ventoy_video_mode
*
g_video_mode_list
=
NULL
;
static
int
g_enumerate_time_checked
=
0
;
static
grub_uint64_t
g_enumerate_start_time_ms
;
static
grub_uint64_t
g_enumerate_finish_time_ms
;
static
const
char
*
g_menu_class
[]
=
static
const
char
*
g_menu_class
[]
=
{
{
"vtoyiso"
,
"vtoywim"
,
"vtoyefi"
,
"vtoyimg"
,
"vtoyvhd"
,
"vtoyvtoy"
"vtoyiso"
,
"vtoywim"
,
"vtoyefi"
,
"vtoyimg"
,
"vtoyvhd"
,
"vtoyvtoy"
...
@@ -1174,6 +1178,18 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
...
@@ -1174,6 +1178,18 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
img_iterator_node
*
new_node
;
img_iterator_node
*
new_node
;
img_iterator_node
*
node
=
(
img_iterator_node
*
)
data
;
img_iterator_node
*
node
=
(
img_iterator_node
*
)
data
;
if
(
g_enumerate_time_checked
==
0
)
{
g_enumerate_finish_time_ms
=
grub_get_time_ms
();
if
((
g_enumerate_finish_time_ms
-
g_enumerate_start_time_ms
)
>=
3000
)
{
grub_cls
();
grub_printf
(
"
\n\n
Ventoy scanning files, please wait...
\n
"
);
grub_refresh
();
g_enumerate_time_checked
=
1
;
}
}
len
=
grub_strlen
(
filename
);
len
=
grub_strlen
(
filename
);
if
(
info
->
dir
)
if
(
info
->
dir
)
...
@@ -1968,6 +1984,8 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
...
@@ -1968,6 +1984,8 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
return
grub_error
(
GRUB_ERR_BAD_ARGUMENT
,
"Must clear image before list"
);
return
grub_error
(
GRUB_ERR_BAD_ARGUMENT
,
"Must clear image before list"
);
}
}
g_enumerate_start_time_ms
=
grub_get_time_ms
();
strdata
=
ventoy_get_env
(
"VTOY_FILT_DOT_UNDERSCORE_FILE"
);
strdata
=
ventoy_get_env
(
"VTOY_FILT_DOT_UNDERSCORE_FILE"
);
if
(
strdata
&&
strdata
[
0
]
==
'1'
&&
strdata
[
1
]
==
0
)
if
(
strdata
&&
strdata
[
0
]
==
'1'
&&
strdata
[
1
]
==
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