mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-27 15:56:30 +00:00
Move variable declarations in LimineMHDIns to top of function.
This commit is contained in:
parent
6ba555ee8f
commit
c5f3102558
1 changed files with 2 additions and 3 deletions
|
@ -18,6 +18,8 @@ Bool LimineMHDIns(U8 drv_let)
|
||||||
CLimineStage2Header *limine_stage2 = limine + 0x1A4;
|
CLimineStage2Header *limine_stage2 = limine + 0x1A4;
|
||||||
U16 limine_stage2_size = limine_size - BLK_SIZE;
|
U16 limine_stage2_size = limine_size - BLK_SIZE;
|
||||||
U16 limine_stage2_size_aligned = limine_stage2_size + ((BLK_SIZE * 2) - limine_stage2_size % (BLK_SIZE * 2));
|
U16 limine_stage2_size_aligned = limine_stage2_size + ((BLK_SIZE * 2) - limine_stage2_size % (BLK_SIZE * 2));
|
||||||
|
CBlkDev *bd = Letter2BlkDev(drv_let);
|
||||||
|
CMasterBoot old_mbr, *new_mbr = limine;
|
||||||
|
|
||||||
if (limine_size == 0)
|
if (limine_size == 0)
|
||||||
{
|
{
|
||||||
|
@ -29,9 +31,6 @@ Bool LimineMHDIns(U8 drv_let)
|
||||||
limine_stage2->location_a = BLK_SIZE;
|
limine_stage2->location_a = BLK_SIZE;
|
||||||
limine_stage2->location_b = BLK_SIZE + limine_stage2->size_a;
|
limine_stage2->location_b = BLK_SIZE + limine_stage2->size_a;
|
||||||
|
|
||||||
CBlkDev *bd = Letter2BlkDev(drv_let);
|
|
||||||
CMasterBoot old_mbr, *new_mbr = limine;
|
|
||||||
|
|
||||||
BlkDevLock(bd);
|
BlkDevLock(bd);
|
||||||
|
|
||||||
AHCIAtaBlksRead(bd, &old_mbr, 0, 1); // read old MBR currently on disk
|
AHCIAtaBlksRead(bd, &old_mbr, 0, 1); // read old MBR currently on disk
|
||||||
|
|
Loading…
Reference in a new issue