]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.38 release v1.0.38
authorlongpanda <admin@ventoy.net>
Tue, 16 Mar 2021 11:35:19 +0000 (19:35 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 16 Mar 2021 11:35:19 +0000 (19:35 +0800)
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
INSTALL/grub/grub.cfg
INSTALL/ventoy/ventoy_unix.cpio
README.md
Unix/ventoy_unix.cpio
Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz
Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz

index 925e554c60aeab1bd6853420192ef31a3bc6fca7..0a9c2e53e463d9536d44cc136d08de996def156c 100644 (file)
@@ -127,6 +127,7 @@ static ventoy_video_mode *g_video_mode_list = NULL;
 static int g_enumerate_time_checked = 0;
 static grub_uint64_t g_enumerate_start_time_ms;
 static grub_uint64_t g_enumerate_finish_time_ms;
+static int g_vtoy_file_flt[VTOY_FILE_FLT_BUTT] = {0};
 
 static const char *g_menu_class[] = 
 {
@@ -233,6 +234,17 @@ static grub_ssize_t ventoy_fs_read(grub_file_t file, char *buf, grub_size_t len)
     return len;
 }
 
+static int ventoy_control_get_flag(const char *key)
+{
+    const char *val = ventoy_get_env(key);
+    
+    if (val && val[0] == '1' && val[1] == 0)
+    {
+        return 1;
+    }
+    return 0;
+}
+
 static grub_err_t ventoy_fs_close(grub_file_t file)
 {
     grub_file_close(g_old_file);
@@ -1270,26 +1282,26 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
             return 0;
         }
 
-        if (0 == grub_strcasecmp(filename + len - 4, ".iso"))
+        if (FILE_FLT(ISO) && 0 == grub_strcasecmp(filename + len - 4, ".iso"))
         {
             type = img_type_iso;
         }
-        else if (g_wimboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".wim")))
+        else if (FILE_FLT(WIM) && g_wimboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".wim")))
         {
             type = img_type_wim;
         }
-        else if (g_vhdboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".vhd") || 
-                    (len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vhdx"))))
+        else if (FILE_FLT(VHD) && g_vhdboot_enable && (0 == grub_strcasecmp(filename + len - 4, ".vhd") || 
+                (len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vhdx"))))
         {
             type = img_type_vhd;
         }
         #ifdef GRUB_MACHINE_EFI
-        else if (0 == grub_strcasecmp(filename + len - 4, ".efi"))
+        else if (FILE_FLT(EFI) && 0 == grub_strcasecmp(filename + len - 4, ".efi"))
         {
             type = img_type_efi;
         }
         #endif
-        else if (0 == grub_strcasecmp(filename + len - 4, ".img"))
+        else if (FILE_FLT(IMG) && 0 == grub_strcasecmp(filename + len - 4, ".img"))
         {
             if (len == 18 && grub_strncmp(filename, "ventoy_", 7) == 0)
             {
@@ -1301,7 +1313,7 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
             }
             type = img_type_img;
         }
-        else if (len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vtoy"))
+        else if (FILE_FLT(VTOY) && len >= 5 && 0 == grub_strcasecmp(filename + len - 5, ".vtoy"))
         {
             type = img_type_vtoy;
         }
@@ -2076,6 +2088,13 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
         }
     }
 
+    g_vtoy_file_flt[VTOY_FILE_FLT_ISO]  = ventoy_control_get_flag("VTOY_FILE_FLT_ISO");
+    g_vtoy_file_flt[VTOY_FILE_FLT_WIM]  = ventoy_control_get_flag("VTOY_FILE_FLT_WIM");
+    g_vtoy_file_flt[VTOY_FILE_FLT_EFI]  = ventoy_control_get_flag("VTOY_FILE_FLT_EFI");
+    g_vtoy_file_flt[VTOY_FILE_FLT_IMG]  = ventoy_control_get_flag("VTOY_FILE_FLT_IMG");
+    g_vtoy_file_flt[VTOY_FILE_FLT_VHD]  = ventoy_control_get_flag("VTOY_FILE_FLT_VHD");
+    g_vtoy_file_flt[VTOY_FILE_FLT_VTOY] = ventoy_control_get_flag("VTOY_FILE_FLT_VTOY");
+
     for (node = &g_img_iterator_head; node; node = node->next)
     {
         fs->fs_dir(dev, node->dir, ventoy_collect_img_files, node);        
index 565344a22663fc128d156c329a07943605261827..f5911565c353cd2ba35b80865a0111620002c2db 100644 (file)
     return (err);\
 }
 
+typedef enum VTOY_FILE_FLT
+{
+    VTOY_FILE_FLT_ISO = 0, /* .iso */
+    VTOY_FILE_FLT_WIM,     /* .wim */
+    VTOY_FILE_FLT_EFI,     /* .efi */
+    VTOY_FILE_FLT_IMG,     /* .img */
+    VTOY_FILE_FLT_VHD,     /* .vhd(x) */
+    VTOY_FILE_FLT_VTOY,    /* .vtoy */
+    
+    VTOY_FILE_FLT_BUTT
+}VTOY_FILE_FLT;
+
+#define FILE_FLT(type) (0 == g_vtoy_file_flt[VTOY_FILE_FLT_##type])
+
 typedef struct ventoy_initrd_ctx
 {
     const char *path_prefix;
index 08504fb49db9741007b60daa376f3dafb9d2cbad..3d45f5ac5186cffd31585f369610816f54c3b741 100644 (file)
@@ -1606,7 +1606,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.37"
+set VENTOY_VERSION="1.0.38"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
index ff97b5e75a12e9444d0c2808606578adcbf62eab..f888ffb60547833c9183d930043fcfb9bfa38088 100644 (file)
Binary files a/INSTALL/ventoy/ventoy_unix.cpio and b/INSTALL/ventoy/ventoy_unix.cpio differ
index 031423c94bdf290f78e8fef52bb4b0633207c335..c5b725c2b9765c275ca966ef66e3a43ac8bf5f74 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ You can copy many image files at a time and ventoy will give you a boot menu to
 x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
 Both MBR and GPT partition style are supported in the same way.<br/>
 Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
-620+ ISO files are tested. 90%+ distros in distrowatch.com supported. <br/>
+650+ ISO files are tested. 90%+ distros in distrowatch.com supported. <br/>
 </h4>
 
 # Features
@@ -35,7 +35,7 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
 * FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
 * ISO files larger than 4GB supported
 * Native boot menu style for Legacy & UEFI
-* Most type of OS supported, 610+ iso files tested
+* Most type of OS supported, 650+ iso files tested
 * Linux vDisk boot supported
 * Not only boot but also complete installation process
 * Menu dynamically switchable between List/TreeView mode
@@ -62,12 +62,19 @@ Please refer to [BuildVentoyFromSource.txt](https://github.com/ventoy/Ventoy/blo
 Title | Link
 -|-
 **Install & Update** | [https://www.ventoy.net/en/doc_start.html](https://www.ventoy.net/en/doc_start.html)
+**Secure Boot** | [https://www.ventoy.net/en/doc_secure.html](https://www.ventoy.net/en/doc_secure.html)
 **Customize Theme** | [https://www.ventoy.net/en/plugin_theme.html](https://www.ventoy.net/en/plugin_theme.html)  
 **Global Control** | [https://www.ventoy.net/en/plugin_control.html](https://www.ventoy.net/en/plugin_control.html)  
+**Image List** | [https://www.ventoy.net/en/plugin_imagelist.html](https://www.ventoy.net/en/plugin_imagelist.html)  
 **Auto Installation** | [https://www.ventoy.net/en/plugin_autoinstall.html](https://www.ventoy.net/en/plugin_autoinstall.html)  
 **Injection Plugin** | [https://www.ventoy.net/en/plugin_injection.html](https://www.ventoy.net/en/plugin_injection.html)  
 **Persistence Support** | [https://www.ventoy.net/en/plugin_persistence.html](https://www.ventoy.net/en/plugin_persistence.html)  
 **Boot WIM file** | [https://www.ventoy.net/en/plugin_wimboot.html](https://www.ventoy.net/en/plugin_wimboot.html)  
+**Windows VHD Boot** | [https://www.ventoy.net/en/plugin_vhdboot.html](https://www.ventoy.net/en/plugin_vhdboot.html)  
+**Linux vDisk Boot** | [https://www.ventoy.net/en/plugin_vtoyboot.html](https://www.ventoy.net/en/plugin_vtoyboot.html)  
+**DUD Plugin** | [https://www.ventoy.net/en/plugin_dud.html](https://www.ventoy.net/en/plugin_dud.html)  
+**Password Plugin** | [https://www.ventoy.net/en/plugin_password.html](https://www.ventoy.net/en/plugin_password.html)  
+**Conf Replace Plugin** | [https://www.ventoy.net/en/plugin_bootconf_replace.html](https://www.ventoy.net/en/plugin_bootconf_replace.html)  
 **Menu Class** | [https://www.ventoy.net/en/plugin_menuclass.html](https://www.ventoy.net/en/plugin_menuclass.html)  
 **Menu Alias** | [https://www.ventoy.net/en/plugin_menualias.html](https://www.ventoy.net/en/plugin_menualias.html)  
 **Menu Extension** | [https://www.ventoy.net/en/plugin_grubmenu.html](https://www.ventoy.net/en/plugin_grubmenu.html)  
@@ -75,6 +82,7 @@ Title | Link
 **TreeView Mode** | [https://www.ventoy.net/en/doc_treeview.html](https://www.ventoy.net/en/doc_treeview.html)  
 **Disk Layout MBR** | [https://www.ventoy.net/en/doc_disk_layout.html](https://www.ventoy.net/en/doc_disk_layout.html)  
 **Disk Layout GPT** | [https://www.ventoy.net/en/doc_disk_layout_gpt.html](https://www.ventoy.net/en/doc_disk_layout_gpt.html)  
+**Search Configuration** | [https://www.ventoy.net/en/doc_search_path.html](https://www.ventoy.net/en/doc_search_path.html)
 
 
 # FAQ
index ff97b5e75a12e9444d0c2808606578adcbf62eab..f888ffb60547833c9183d930043fcfb9bfa38088 100644 (file)
Binary files a/Unix/ventoy_unix.cpio and b/Unix/ventoy_unix.cpio differ
index 38eb428b4b0bfe699b29722973feede28a658349..280d1487db5c66863f499ca4531e48319ee97383 100644 (file)
Binary files a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz and b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko.xz differ
index 5afe74d9b84ef1f2ba3e40b196c0844fd51b3c34..8636888e1effb0c0e0641603a4d30ad70b8d3028 100644 (file)
Binary files a/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz and b/Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko.xz differ