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
315cabb9
Commit
315cabb9
authored
Jan 07, 2023
by
longpanda
Browse files
Fix the file path when file checksum in F2 browse mode.
parent
72f25f14
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
GRUB2/MOD_SRC/grub-2.04/grub-core/commands/hashsum.c
GRUB2/MOD_SRC/grub-2.04/grub-core/commands/hashsum.c
+3
-1
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
+4
-2
GRUB2/MOD_SRC/grub-2.04/install.sh
GRUB2/MOD_SRC/grub-2.04/install.sh
+1
-1
INSTALL/grub/grub.cfg
INSTALL/grub/grub.cfg
+0
-1
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/commands/hashsum.c
View file @
315cabb9
...
@@ -260,6 +260,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
...
@@ -260,6 +260,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
grub_file_t
file
;
grub_file_t
file
;
grub_err_t
err
;
grub_err_t
err
;
unsigned
j
;
unsigned
j
;
int
vlnk
=
0
;
file
=
grub_file_open
(
args
[
i
],
GRUB_FILE_TYPE_TO_HASH
file
=
grub_file_open
(
args
[
i
],
GRUB_FILE_TYPE_TO_HASH
|
(
!
uncompress
?
GRUB_FILE_TYPE_NO_DECOMPRESS
|
(
!
uncompress
?
GRUB_FILE_TYPE_NO_DECOMPRESS
:
GRUB_FILE_TYPE_NONE
));
:
GRUB_FILE_TYPE_NONE
));
...
@@ -272,6 +273,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
...
@@ -272,6 +273,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
unread
++
;
unread
++
;
continue
;
continue
;
}
}
vlnk
=
file
->
vlnk
;
err
=
hash_file
(
file
,
hash
,
result
);
err
=
hash_file
(
file
,
hash
,
result
);
grub_file_close
(
file
);
grub_file_close
(
file
);
if
(
err
)
if
(
err
)
...
@@ -288,7 +290,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
...
@@ -288,7 +290,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
grub_printf
(
"%02x"
,
((
grub_uint8_t
*
)
result
)[
j
]);
grub_printf
(
"%02x"
,
((
grub_uint8_t
*
)
result
)[
j
]);
len
+=
grub_snprintf
(
hashsum
+
len
,
sizeof
(
hashsum
)
-
len
,
"%02x"
,
((
grub_uint8_t
*
)
result
)[
j
]);
len
+=
grub_snprintf
(
hashsum
+
len
,
sizeof
(
hashsum
)
-
len
,
"%02x"
,
((
grub_uint8_t
*
)
result
)[
j
]);
}
}
grub_printf
(
" %s
\n
"
,
args
[
i
]);
grub_printf
(
" %s
\n
"
,
vlnk
?
grub_file_get_vlnk
(
args
[
i
],
NULL
)
:
args
[
i
]);
grub_env_set
(
"VT_LAST_CHECK_SUM"
,
hashsum
);
grub_env_set
(
"VT_LAST_CHECK_SUM"
,
hashsum
);
}
}
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/file.c
View file @
315cabb9
...
@@ -200,6 +200,7 @@ const char *grub_file_get_vlnk(const char *name, int *vlnk)
...
@@ -200,6 +200,7 @@ const char *grub_file_get_vlnk(const char *name, int *vlnk)
if
(
len
==
g_vtoy_vlnk
.
srclen
&&
grub_strcmp
(
name
,
g_vtoy_vlnk
.
src
)
==
0
)
if
(
len
==
g_vtoy_vlnk
.
srclen
&&
grub_strcmp
(
name
,
g_vtoy_vlnk
.
src
)
==
0
)
{
{
if
(
vlnk
)
*
vlnk
=
1
;
*
vlnk
=
1
;
return
g_vtoy_vlnk
.
dst
;
return
g_vtoy_vlnk
.
dst
;
}
}
...
@@ -208,6 +209,7 @@ const char *grub_file_get_vlnk(const char *name, int *vlnk)
...
@@ -208,6 +209,7 @@ const char *grub_file_get_vlnk(const char *name, int *vlnk)
{
{
if
(
node
->
srclen
==
len
&&
grub_strcmp
(
name
,
node
->
src
)
==
0
)
if
(
node
->
srclen
==
len
&&
grub_strcmp
(
name
,
node
->
src
)
==
0
)
{
{
if
(
vlnk
)
*
vlnk
=
1
;
*
vlnk
=
1
;
return
node
->
dst
;
return
node
->
dst
;
}
}
...
...
GRUB2/MOD_SRC/grub-2.04/install.sh
View file @
315cabb9
...
@@ -12,7 +12,7 @@ make install
...
@@ -12,7 +12,7 @@ make install
PATH
=
$VT_DIR
/GRUB2/INSTALL/bin/:
$VT_DIR
/GRUB2/INSTALL/sbin/:
$PATH
PATH
=
$VT_DIR
/GRUB2/INSTALL/bin/:
$VT_DIR
/GRUB2/INSTALL/sbin/:
$PATH
net_modules_legacy
=
"net tftp http"
net_modules_legacy
=
"net tftp http"
all_modules_legacy
=
"file date drivemap blocklist 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 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"
all_modules_legacy
=
"file date drivemap blocklist 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 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
video_fb
udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios"
net_modules_uefi
=
"efinet net tftp http"
net_modules_uefi
=
"efinet net tftp http"
all_modules_uefi
=
"file setkey blocklist ventoy test true regexp newc search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux relocator jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop efi_uga video_bochs video_cirrus video video_fb gfxterm_background gfxterm_menu mouse fwload smbios zfs"
all_modules_uefi
=
"file setkey blocklist ventoy test true regexp newc search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux relocator jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop efi_uga video_bochs video_cirrus video video_fb gfxterm_background gfxterm_menu mouse fwload smbios zfs"
...
...
INSTALL/grub/grub.cfg
View file @
315cabb9
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
if [ "$grub_platform" = "pc" ]; then
if [ "$grub_platform" = "pc" ]; then
insmod setkey
insmod setkey
insmod regexp
insmod regexp
insmod video_fb
fi
fi
function ventoy_pause {
function ventoy_pause {
...
...
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