mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 23:36:32 +00:00
Make LimineMHDIns copy autogenerated Limine.CFG to all Zeal partitions.
This commit is contained in:
parent
ceba85119d
commit
ac8c1754da
1 changed files with 30 additions and 20 deletions
|
@ -19,6 +19,7 @@ Bool LimineCFGMake(U8 drv_let)
|
||||||
CBlkDev *bd;
|
CBlkDev *bd;
|
||||||
I64 i;
|
I64 i;
|
||||||
U8 *filename_sys, *filename_elf, *filename_zxe, *st;
|
U8 *filename_sys, *filename_elf, *filename_zxe, *st;
|
||||||
|
|
||||||
// Limine interface settings
|
// Limine interface settings
|
||||||
DocPrint(doc,
|
DocPrint(doc,
|
||||||
"TIMEOUT=2\n"
|
"TIMEOUT=2\n"
|
||||||
|
@ -26,13 +27,11 @@ Bool LimineCFGMake(U8 drv_let)
|
||||||
|
|
||||||
for (i = 0, drive = blkdev.drvs; i < DRIVES_NUM; i++, drive++)
|
for (i = 0, drive = blkdev.drvs; i < DRIVES_NUM; i++, drive++)
|
||||||
{
|
{
|
||||||
if (drive->drive_signature == DRIVE_SIGNATURE_VAL)
|
if (drive->drive_signature == DRIVE_SIGNATURE_VAL && drive->fs_type == FSt_FAT32 && DriveIsWritable(drive->drv_let))
|
||||||
{
|
{
|
||||||
bd = drive->bd;
|
bd = drive->bd;
|
||||||
drv_let = Drive2Letter(drive);
|
drv_let = Drive2Letter(drive);
|
||||||
|
|
||||||
if (DriveIsWritable(drv_let) && drive->fs_type == FSt_FAT32)
|
|
||||||
{
|
|
||||||
filename_sys = MStrPrint("%C:/Boot/Limine.SYS", drv_let);
|
filename_sys = MStrPrint("%C:/Boot/Limine.SYS", drv_let);
|
||||||
filename_elf = MStrPrint("%C:/Boot/ZealBooter.ELF", drv_let);
|
filename_elf = MStrPrint("%C:/Boot/ZealBooter.ELF", drv_let);
|
||||||
filename_zxe = MStrPrint("%C:/Boot/Kernel.ZXE", drv_let);
|
filename_zxe = MStrPrint("%C:/Boot/Kernel.ZXE", drv_let);
|
||||||
|
@ -52,11 +51,22 @@ Bool LimineCFGMake(U8 drv_let)
|
||||||
"\n%C:/ drive is missing Limine bootloader files.\n", drv_let;
|
"\n%C:/ drive is missing Limine bootloader files.\n", drv_let;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DocWrite(doc);
|
DocWrite(doc);
|
||||||
DocDel(doc);
|
DocDel(doc);
|
||||||
|
|
||||||
|
for (i = 0, drive = blkdev.drvs; i < DRIVES_NUM; i++, drive++)
|
||||||
|
{
|
||||||
|
if (drive->drive_signature == DRIVE_SIGNATURE_VAL && drive->fs_type == FSt_FAT32 && DriveIsWritable(drive->drv_let))
|
||||||
|
{
|
||||||
|
drv_let = Drive2Letter(drive);
|
||||||
|
if (FileFind(filename_sys) && FileFind(filename_elf) && FileFind(filename_zxe))
|
||||||
|
{
|
||||||
|
st = MStrPrint("%C:/Boot/Limine.CFG", drv_let);
|
||||||
|
Copy(filename_cfg, st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue