mirror of
				https://github.com/ventoy/Ventoy.git
				synced 2025-10-30 00:05:09 -04:00 
			
		
		
		
	Fix the file path when file checksum in F2 browse mode.
This commit is contained in:
		
							parent
							
								
									72f25f14fc
								
							
						
					
					
						commit
						315cabb945
					
				| @ -260,6 +260,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt, | ||||
|       grub_file_t file; | ||||
|       grub_err_t err; | ||||
|       unsigned j; | ||||
|       int vlnk = 0; | ||||
|       file = grub_file_open (args[i], GRUB_FILE_TYPE_TO_HASH | ||||
| 			     | (!uncompress ? GRUB_FILE_TYPE_NO_DECOMPRESS | ||||
| 				: GRUB_FILE_TYPE_NONE)); | ||||
| @ -272,6 +273,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt, | ||||
| 	  unread++; | ||||
| 	  continue; | ||||
| 	} | ||||
|       vlnk = file->vlnk; | ||||
|       err = hash_file (file, hash, result); | ||||
|       grub_file_close (file); | ||||
|       if (err) | ||||
| @ -288,7 +290,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt, | ||||
| 	    grub_printf ("%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); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -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 (vlnk) | ||||
|             *vlnk = 1; | ||||
|         return g_vtoy_vlnk.dst;  | ||||
|     } | ||||
| @ -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 (vlnk) | ||||
|                 *vlnk = 1; | ||||
|             return node->dst; | ||||
|         } | ||||
|  | ||||
| @ -12,7 +12,7 @@ make install | ||||
| PATH=$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/:$PATH | ||||
| 
 | ||||
| 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" | ||||
| 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" | ||||
|  | ||||
| @ -19,7 +19,6 @@ | ||||
| if [ "$grub_platform" = "pc" ]; then | ||||
|     insmod setkey | ||||
|     insmod regexp | ||||
|     insmod video_fb | ||||
| fi | ||||
| 
 | ||||
| function ventoy_pause { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user