mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-05-19 01:35:15 -04:00
Optimization for Linux vDisk boot in Legacy BIOS mode
This commit is contained in:
parent
9ddee7394d
commit
40fdfa66b9
4 changed files with 9 additions and 2 deletions
|
@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|||
|
||||
int g_debug = 0;
|
||||
int g_hddmode = 0;
|
||||
int g_bios_disk80 = 0;
|
||||
char *g_cmdline_copy;
|
||||
void *g_initrd_addr;
|
||||
size_t g_initrd_len;
|
||||
|
@ -697,6 +698,11 @@ int ventoy_boot_vdisk(void *data)
|
|||
{
|
||||
g_hddmode = 1;
|
||||
}
|
||||
|
||||
if (strstr(g_cmdline_copy, "bios80"))
|
||||
{
|
||||
g_bios_disk80 = 1;
|
||||
}
|
||||
|
||||
g_chain = (ventoy_chain_head *)g_initrd_addr;
|
||||
g_chunk = (ventoy_img_chunk *)((char *)g_chain + g_chain->img_chunk_offset);
|
||||
|
|
|
@ -1425,7 +1425,7 @@ unsigned int ventoy_int13_hook (ventoy_chain_head *chain)
|
|||
|
||||
if (g_hddmode)
|
||||
{
|
||||
natural_drive = num_drives | 0x80;
|
||||
natural_drive = g_bios_disk80 ? 0x80 : (num_drives | 0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -187,6 +187,7 @@ typedef struct ventoy_sector_flag
|
|||
|
||||
extern int g_debug;
|
||||
extern int g_hddmode;
|
||||
extern int g_bios_disk80;
|
||||
extern char *g_cmdline_copy;
|
||||
extern void *g_initrd_addr;
|
||||
extern size_t g_initrd_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue