Fix the vhd.vtoy file boot issue in ext4 file system. (#3444)
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled

This commit is contained in:
longpanda
2025-12-18 08:55:37 +08:00
parent c42abd33c2
commit 65b88aabc5

View File

@@ -3410,6 +3410,7 @@ int ventoy_get_block_list(grub_file_t file, ventoy_img_chunk_list *chunklist, gr
static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, char **args)
{
int rc;
int fs_type;
grub_file_t file;
grub_disk_addr_t start;
char errmsg[128];
@@ -3432,7 +3433,8 @@ static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, ch
grub_free(g_img_chunk_list.chunk);
}
if (ventoy_get_fs_type(file->fs->name) >= ventoy_fs_max)
fs_type = ventoy_get_fs_type(file->fs->name);
if (fs_type >= ventoy_fs_max)
{
grub_file_close(file);
return grub_error(GRUB_ERR_BAD_ARGUMENT, "Unsupported filesystem %s\n", file->fs->name);
@@ -3458,8 +3460,11 @@ static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, ch
if (rc)
{
vtoy_tip(10, "%s\n\nWill exit in 10 seconds...\n", errmsg);
grub_exit();
if (fs_type == ventoy_fs_btrfs)
{
vtoy_tip(10, "%s\n\nWill exit in 10 seconds...\n", errmsg);
grub_exit();
}
return grub_error(GRUB_ERR_NOT_IMPLEMENTED_YET, "%s\n", errmsg);
}