]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h
Update README.md
[Ventoy.git] / GRUB2 / MOD_SRC / grub-2.04 / include / grub / ventoy.h
index d593ad4ca406d8017f446951294516f0282248c2..56f357db471b15ce8dbc52abdbaf778e7e956e79 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __VENTOY_H__
 #define __VENTOY_H__
 
-#define COMPILE_ASSERT(expr)  extern char __compile_assert[(expr) ? 1 : -1]
+#define COMPILE_ASSERT(a, expr)  extern char __compile_assert##a[(expr) ? 1 : -1]
 
 #define VENTOY_COMPATIBLE_STR      "VENTOY COMPATIBLE"
 #define VENTOY_COMPATIBLE_STR_LEN  17
@@ -139,11 +139,21 @@ typedef struct ventoy_windows_data
 }ventoy_windows_data;
 
 
+typedef struct ventoy_secure_data
+{
+    grub_uint8_t magic1[16];     /* VENTOY_GUID */
+    grub_uint8_t diskuuid[16];   
+    grub_uint8_t Checksum[16];    
+    grub_uint8_t adminSHA256[32];
+    grub_uint8_t reserved[4000];
+    grub_uint8_t magic2[16];     /* VENTOY_GUID */
+}ventoy_secure_data;
 
 #pragma pack()
 
 // compile assert check : sizeof(ventoy_os_param) must be 512
-COMPILE_ASSERT(sizeof(ventoy_os_param) == 512);
+COMPILE_ASSERT(1,sizeof(ventoy_os_param) == 512);
+COMPILE_ASSERT(2,sizeof(ventoy_secure_data) == 4096);
 
 
 
@@ -176,6 +186,18 @@ typedef struct ventoy_chain_head
     grub_uint32_t virt_chunk_num;
 }ventoy_chain_head;
 
+typedef struct ventoy_image_desc
+{
+    grub_uint64_t disk_size;
+    grub_uint64_t part1_size;
+    grub_uint8_t  disk_uuid[16];
+    grub_uint8_t  disk_signature[4];
+    grub_uint32_t img_chunk_count;
+    /* ventoy_img_chunk list */
+}ventoy_image_desc;
+
+
+
 typedef struct ventoy_img_chunk
 {
     grub_uint32_t img_start_sector; // sector size: 2KB
@@ -242,7 +264,6 @@ typedef struct ventoy_grub_param
 
 #pragma pack()
 
-
 int grub_ext_get_file_chunk(grub_uint64_t part_start, grub_file_t file, ventoy_img_chunk_list *chunk_list);
 int grub_fat_get_file_chunk(grub_uint64_t part_start, grub_file_t file, ventoy_img_chunk_list *chunk_list);
 void grub_iso9660_set_nojoliet(int nojoliet);