mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-27 16:01:14 +00:00
1.0.05 release
1. Add backup thread in vtoyjump.exe 2. New iso support MXLinux 19.1 (Legacy + UEFI) KNOPPIX_V8.6-2019-08-08-EN.iso (Legacy) Puppy Linux, bionicpup64-8.0-uefi.iso (Legacy + UEFI) tails-amd64-4.5.iso (Legacy) slax-64bit-9.11.0.iso (Legacy) Kaspersky Rescue Disk 18 (Legacy + UEFI) Parted Magic 2018 Bootable ISO (Legacy + UEFI) veket_20.iso (Legacy) ZeroShell-3.9.3-X86.iso (Legacy) SuperGrub2Disk rescatux-0.73.iso (Legacy + UEFI) Some WinPE iso (Legacy + UEFI)
This commit is contained in:
@@ -1197,6 +1197,7 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_linux_clear_initrd", ventoy_cmd_clear_initrd_list, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_dump_initrd", ventoy_cmd_dump_initrd_list, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_initrd_count", ventoy_cmd_initrd_count, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_valid_initrd_count", ventoy_cmd_valid_initrd_count, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_locate_initrd", ventoy_cmd_linux_locate_initrd, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_chain_data", ventoy_cmd_linux_chain_data, 0, NULL, "", "", NULL },
|
||||
|
||||
|
@@ -398,6 +398,7 @@ int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector);
|
||||
grub_err_t ventoy_cmd_linux_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_linux_locate_initrd(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_initrd_count(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_valid_initrd_count(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
int ventoy_cpio_newc_fill_head(void *buf, int filesize, void *filedata, const char *name);
|
||||
grub_file_t ventoy_grub_file_open(enum grub_file_type type, const char *fmt, ...);
|
||||
|
@@ -543,6 +543,7 @@ grub_err_t ventoy_cmd_specify_initrd_file(grub_extcmd_context_t ctxt, int argc,
|
||||
grub_strncpy(img->name, args[0], sizeof(img->name));
|
||||
if (ventoy_find_initrd_by_name(g_initrd_img_list, img->name))
|
||||
{
|
||||
debug("%s is already exist\n", args[0]);
|
||||
grub_free(img);
|
||||
}
|
||||
else
|
||||
@@ -738,6 +739,23 @@ grub_err_t ventoy_cmd_initrd_count(grub_extcmd_context_t ctxt, int argc, char **
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
grub_snprintf(buf, sizeof(buf), "%d", g_initrd_img_count);
|
||||
grub_env_set(args[0], buf);
|
||||
}
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_valid_initrd_count(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
char buf[32] = {0};
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
grub_snprintf(buf, sizeof(buf), "%d", g_valid_initrd_count);
|
||||
@@ -750,6 +768,7 @@ grub_err_t ventoy_cmd_initrd_count(grub_extcmd_context_t ctxt, int argc, char **
|
||||
static grub_err_t ventoy_linux_locate_initrd(int filt, int *filtcnt)
|
||||
{
|
||||
int data;
|
||||
int filtbysize = 1;
|
||||
int sizefilt = 0;
|
||||
grub_file_t file;
|
||||
initrd_info *node;
|
||||
@@ -757,6 +776,11 @@ static grub_err_t ventoy_linux_locate_initrd(int filt, int *filtcnt)
|
||||
debug("ventoy_linux_locate_initrd %d\n", filt);
|
||||
|
||||
g_valid_initrd_count = 0;
|
||||
|
||||
if (grub_env_get("INITRD_NO_SIZE_FILT"))
|
||||
{
|
||||
filtbysize = 0;
|
||||
}
|
||||
|
||||
for (node = g_initrd_img_list; node; node = node->next)
|
||||
{
|
||||
@@ -769,12 +793,18 @@ static grub_err_t ventoy_linux_locate_initrd(int filt, int *filtcnt)
|
||||
debug("file <%s> size:%d\n", node->name, (int)file->size);
|
||||
|
||||
/* initrd file too small */
|
||||
if (filt > 0 && file->size <= g_ventoy_cpio_size + 2048)
|
||||
if (filtbysize
|
||||
&& (NULL == grub_strstr(node->name, "minirt.gz"))
|
||||
&& (NULL == grub_strstr(node->name, "initrd.xz"))
|
||||
)
|
||||
{
|
||||
debug("file size too small %d\n", (int)g_ventoy_cpio_size);
|
||||
grub_file_close(file);
|
||||
sizefilt++;
|
||||
continue;
|
||||
if (filt > 0 && file->size <= g_ventoy_cpio_size + 2048)
|
||||
{
|
||||
debug("file size too small %d\n", (int)g_ventoy_cpio_size);
|
||||
grub_file_close(file);
|
||||
sizefilt++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (grub_strcmp(file->fs->name, "iso9660") == 0)
|
||||
|
Reference in New Issue
Block a user