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
62022950
Commit
62022950
authored
Apr 19, 2022
by
longpanda
Browse files
Show the directory path in the return menu for TreeView mode and Browser mode.
parent
5553dd4f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c
+4
-4
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
+8
-8
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
+2
-2
GRUB2/MOD_SRC/grub-2.04/install.sh
GRUB2/MOD_SRC/grub-2.04/install.sh
+1
-1
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c
View file @
62022950
...
...
@@ -520,13 +520,13 @@ grub_err_t ventoy_cmd_browser_dir(grub_extcmd_context_t ctxt, int argc, char **a
if
(
g_tree_view_menu_style
==
0
)
{
browser_ssprintf
(
&
mbuf
,
"menuentry
\"
%-10s [..
/
]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo 'return ...'
\n
}
\n
"
,
"<--"
);
browser_ssprintf
(
&
mbuf
,
"menuentry
\"
%-10s [
(%s)%s/
..]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo 'return ...'
\n
}
\n
"
,
"<--"
,
args
[
0
],
g_menu_path_buf
);
}
else
{
browser_ssprintf
(
&
mbuf
,
"menuentry
\"
[..
/
]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo 'return ...'
\n
}
\n
"
);
browser_ssprintf
(
&
mbuf
,
"menuentry
\"
[
(%s)%s/
..]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo 'return ...'
\n
}
\n
"
,
args
[
0
],
g_menu_path_buf
);
}
for
(
i
=
1
;
i
>=
0
;
i
--
)
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
View file @
62022950
...
...
@@ -2295,8 +2295,8 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
{
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"menuentry
\"
[Return to ListView]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo '
%s
...'
\n
"
"}
\n
"
,
"return"
);
" echo '
return
...'
\n
"
"}
\n
"
);
}
}
...
...
@@ -2350,16 +2350,16 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
if
(
g_tree_view_menu_style
==
0
)
{
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"menuentry
\"
%-10s [..
/
]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
"menuentry
\"
%-10s [
%s/
..]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo 'return ...'
\n
"
"}
\n
"
,
"<--"
);
"}
\n
"
,
"<--"
,
node
->
dir
);
}
else
{
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"menuentry
\"
[..
/
]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo '
%s
...'
\n
"
"}
\n
"
,
"return"
);
"menuentry
\"
[
%s/
..]
\"
--class=
\"
vtoyret
\"
VTOY_RET {
\n
"
" echo '
return
...'
\n
"
"}
\n
"
,
node
->
dir
);
}
}
...
...
@@ -2397,7 +2397,7 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
if
(
node
!=
&
g_img_iterator_head
)
{
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"%s"
,
"}
\n
"
);
vtoy_ssprintf
(
g_tree_script_buf
,
g_tree_script_pos
,
"}
\n
"
);
}
node
->
done
=
1
;
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
View file @
62022950
...
...
@@ -313,8 +313,8 @@ extern int g_ventoy_debug;
void
ventoy_debug
(
const
char
*
fmt
,
...);
#define debug(fmt, args...) if (g_ventoy_debug) ventoy_debug("[VTOY]: "fmt, ##args)
#define vtoy_ssprintf(buf, pos, fmt, ...) \
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt,
__VA_ARGS__
)
#define vtoy_ssprintf(buf, pos, fmt,
args
...) \
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt,
##args
)
#define browser_ssprintf(mbuf, fmt, args...) \
(mbuf)->pos += grub_snprintf((mbuf)->buf + (mbuf)->pos, (mbuf)->max - (mbuf)->pos, fmt, ##args)
...
...
GRUB2/MOD_SRC/grub-2.04/install.sh
View file @
62022950
...
...
@@ -9,7 +9,7 @@ mkdir -p $VT_DIR/GRUB2/PXE
make
install
PATH
=
$
PATH
:
$
VT_DIR
/GRUB2/INSTALL/bin/:
$VT_DIR
/GRUB2/INSTALL/sbin/
PATH
=
$VT_DIR
/GRUB2/INSTALL/bin/:
$VT_DIR
/GRUB2/INSTALL/sbin/
:
$PATH
net_modules_legacy
=
"net tftp http"
all_modules_legacy
=
"file setkey date drivemap blocklist regexp newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe video_fb font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios"
...
...
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