]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - LinuxGUI/Ventoy2Disk/Core/ventoy_disk.c
Disable Fn/L/Ctrl hotkeys when selecting auto install script or perssitence file.
[Ventoy.git] / LinuxGUI / Ventoy2Disk / Core / ventoy_disk.c
index a4ac62b5acd9bec7e9d5befaef5b78904ef789ac..04eb7f489c55254f0821286ec0218571cfdb297d 100644 (file)
@@ -514,6 +514,8 @@ int ventoy_get_vtoy_data(ventoy_disk *info, int *ppartstyle)
     vdebug("ventoy partition layout check OK: [%llu %llu] [%llu %llu]\n", 
                part1_start_sector, part1_sector_count, part2_start_sector, part2_sector_count);
 
+    vtoy->ventoy_valid = 1;
+
     vdebug("now check secure boot for %s ...\n", info->disk_path);
 
     g_fatlib_media_fd = fd;
@@ -526,7 +528,6 @@ int ventoy_get_vtoy_data(ventoy_disk *info, int *ppartstyle)
         if (ret == 0 && vtoy->ventoy_ver[0])
         {
             vtoy->secure_boot_flag = fatlib_is_secure_boot_enable();            
-            vtoy->ventoy_valid = 1;
         }
         else
         {
@@ -542,6 +543,11 @@ int ventoy_get_vtoy_data(ventoy_disk *info, int *ppartstyle)
     g_fatlib_media_fd = -1;
     g_fatlib_media_offset = 0;
 
+    if (vtoy->ventoy_ver[0] == 0)
+    {
+        vtoy->ventoy_ver[0] = '?';
+    }
+
     if (0 == vtoy->ventoy_valid)
     {
         goto end;