diff --git a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.c b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.c index edb67691..4a3a98c9 100644 --- a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.c +++ b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.c @@ -408,12 +408,12 @@ STATIC VOID ventoy_warn_invalid_device(VOID) gST->ConOut->OutputString(gST->ConOut, VTOY_WARNING L"\r\n"); gST->ConOut->OutputString(gST->ConOut, VTOY_WARNING L"\r\n\r\n\r\n"); - gST->ConOut->OutputString(gST->ConOut, L"This is NOT a standard Ventoy device and is NOT officially supported.\r\n\r\n"); + gST->ConOut->OutputString(gST->ConOut, L"This is NOT a standard Ventoy device and is NOT supported.\r\n\r\n"); gST->ConOut->OutputString(gST->ConOut, L"You should follow the official instructions in https://www.ventoy.net\r\n"); - gST->ConOut->OutputString(gST->ConOut, L"\r\n\r\nWill continue to boot after 15 seconds ...... "); + gST->ConOut->OutputString(gST->ConOut, L"\r\n\r\nWill exit after 10 seconds ...... "); - sleep(15); + sleep(10); } #else STATIC VOID ventoy_warn_invalid_device(VOID) @@ -718,6 +718,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle) if (pEnv[0] != '0' || pEnv[1] != 0) { ventoy_warn_invalid_device(); + return EFI_INVALID_PARAMETER; } g_file_replace_list = &pGrubParam->file_replace; diff --git a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.h b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.h index 7113e86e..b774f859 100644 --- a/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.h +++ b/EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/Ventoy.h @@ -185,7 +185,7 @@ typedef struct ventoy_virt_chunk #error Unknown Processor Type #endif -#define VENTOY_DEVICE_WARN 0 +#define VENTOY_DEVICE_WARN 1 #define VTOY_WARNING L"!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!" typedef struct ventoy_sector_flag diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c index 7c47357d..8be06582 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c @@ -1639,15 +1639,14 @@ int ventoy_check_device_result(int ret) grub_env_set("VTOY_CHKDEV_RESULT_STRING", buf); grub_env_export("VTOY_CHKDEV_RESULT_STRING"); - if (ret & 0x1000) + if (ret) { grub_printf(VTOY_WARNING"\n"); grub_printf(VTOY_WARNING"\n"); grub_printf(VTOY_WARNING"\n\n\n"); - grub_printf("Unsatisfied conditions detected for Ventoy.\n\n"); - grub_printf("This is NOT a standard Ventoy device and is NOT officially supported.\n\n"); - grub_printf("Recommend to follow the instructions in https://www.ventoy.net to use Ventoy.\n"); + grub_printf("This is NOT a standard Ventoy device and is NOT supported.\n\n"); + grub_printf("You should follow the instructions in https://www.ventoy.net to use Ventoy.\n"); grub_printf("\n\nWill exit after 10 seconds ...... "); grub_refresh(); @@ -3522,7 +3521,7 @@ static grub_err_t ventoy_cmd_load_part_table(grub_extcmd_context_t ctxt, int arg ret = ventoy_check_device(dev); grub_device_close(dev); - if (ret & 0x1000) + if (ret) { grub_exit(); }