]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.40 release v1.0.40
authorlongpanda <admin@ventoy.net>
Sat, 10 Apr 2021 12:01:39 +0000 (20:01 +0800)
committerlongpanda <admin@ventoy.net>
Sat, 10 Apr 2021 12:01:39 +0000 (20:01 +0800)
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_windows.c
INSTALL/grub/grub.cfg
INSTALL/grub/themes/ventoy/theme.txt

index 349a233719586097beb397bce6b52001c1656aee..6fa12e80f6716e10ea4b9335425ed17e26290895 100644 (file)
@@ -390,6 +390,15 @@ typedef struct wim_security_header
     grub_uint32_t count; /* Number of entries */
 }wim_security_header;
 
     grub_uint32_t count; /* Number of entries */
 }wim_security_header;
 
+typedef struct wim_stream_entry 
+{
+    grub_uint64_t len;
+    grub_uint64_t unused1;
+    wim_hash hash;
+    grub_uint16_t name_len;
+    /* name */
+}wim_stream_entry;
+
 /* Directory entry */
 typedef struct wim_directory_entry 
 {
 /* Directory entry */
 typedef struct wim_directory_entry 
 {
index d7ea1b089dc753ec0805bffe99c7408e81e93934..f6d4d26acd7495f134baff2850a6eed756c86c82 100644 (file)
@@ -636,6 +636,21 @@ static wim_lookup_entry * ventoy_find_meta_entry(wim_header *header, wim_lookup_
     return NULL;
 }
 
     return NULL;
 }
 
+static grub_uint64_t ventoy_get_stream_len(wim_directory_entry *dir)
+{
+    grub_uint16_t i;
+    grub_uint64_t offset = 0;
+    wim_stream_entry *stream = (wim_stream_entry *)((char *)dir + dir->len);
+
+    for (i = 0; i < dir->streams; i++)
+    {
+        offset += stream->len;
+        stream = (wim_stream_entry *)((char *)stream + stream->len);
+    }
+
+    return offset;
+}
+
 static int ventoy_update_all_hash(wim_patch *patch, void *meta_data, wim_directory_entry *dir)
 {
     if ((meta_data == NULL) || (dir == NULL))
 static int ventoy_update_all_hash(wim_patch *patch, void *meta_data, wim_directory_entry *dir)
 {
     if ((meta_data == NULL) || (dir == NULL))
@@ -660,8 +675,15 @@ static int ventoy_update_all_hash(wim_patch *patch, void *meta_data, wim_directo
         {
             ventoy_update_all_hash(patch, meta_data, (wim_directory_entry *)((char *)meta_data + dir->subdir));
         }
         {
             ventoy_update_all_hash(patch, meta_data, (wim_directory_entry *)((char *)meta_data + dir->subdir));
         }
-    
-        dir = (wim_directory_entry *)((char *)dir + dir->len);
+
+        if (dir->streams)
+        {
+            dir = (wim_directory_entry *)((char *)dir + dir->len + ventoy_get_stream_len(dir));
+        }
+        else
+        {
+            dir = (wim_directory_entry *)((char *)dir + dir->len);            
+        }
     } while (dir->len >= sizeof(wim_directory_entry));
 
     return 0;
     } while (dir->len >= sizeof(wim_directory_entry));
 
     return 0;
index 89ea98085a81ab63c0d782b37d06f4398559761f..386997d659c893af1b9992d244202d00fbc4f048 100644 (file)
@@ -1612,7 +1612,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.39"
+set VENTOY_VERSION="1.0.40"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
index a8f0585d082fd547b711ea80dcb4de4c797626a1..708acd2583ba3f82a4d290fdd36e82fceee620e2 100644 (file)
@@ -71,7 +71,7 @@ terminal-box: "terminal_box_*.png"
 
 
 + hbox{ 
 
 
 + hbox{ 
-    left = 30%+100
+    left = 30%+200
     top = 95%-50
     width = 10%
     height = 25
     top = 95%-50
     width = 10%
     height = 25