mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
Fix bare-metal installer invalid port string.
This commit is contained in:
parent
674ef844b8
commit
2bf3d229bc
3 changed files with 8 additions and 7 deletions
Binary file not shown.
|
@ -234,6 +234,7 @@ U8 *AHCIBufferAlign(CBlkDev *bd, U8 *user_buf, I64 buf_size, Bool write)
|
|||
if(user_buf + buf_size > U32_MAX || user_buf & 1)
|
||||
{//if the buffer is not within 32-bit address space or not U16-aligned
|
||||
// "Aligning buffer under 32-bit range\n";
|
||||
|
||||
Free(bd->prd_buf);
|
||||
bd->prd_buf = MAlloc(buf_size, Fs->code_heap);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ U0 VMInstallWiz()
|
|||
U0 RegularInstallWiz()
|
||||
{
|
||||
I64 drv_let;
|
||||
U8 *st;
|
||||
U8 *st, *port_st;
|
||||
I64 ch, res_num;
|
||||
CTask *task;
|
||||
|
||||
|
@ -127,16 +127,16 @@ U0 RegularInstallWiz()
|
|||
"Hard Drive Port: ";
|
||||
while (TRUE)
|
||||
{
|
||||
st = StrGet;
|
||||
if ((0 <= Str2I64(st) < AHCI_MAX_PORTS) &&
|
||||
((&blkdev.ahci_hba->ports[Str2I64(st)])->signature == AHCI_PxSIG_ATA))
|
||||
port_st = StrGet;
|
||||
if ((0 <= Str2I64(port_st) < AHCI_MAX_PORTS) &&
|
||||
((&blkdev.ahci_hba->ports[Str2I64(port_st)])->signature == AHCI_PxSIG_ATA))
|
||||
{
|
||||
break;
|
||||
}
|
||||
Free(st);
|
||||
Free(port_st);
|
||||
}
|
||||
|
||||
XTalkWait(task, "%s\n\n", st);
|
||||
XTalkWait(task, "%s\n\n", port_st);
|
||||
|
||||
DriveRep;
|
||||
do
|
||||
|
@ -174,7 +174,7 @@ U0 RegularInstallWiz()
|
|||
InstallDrive(drv_let);
|
||||
|
||||
|
||||
XTalkWait(task, "BootHDIns('%C');\n\nB\n0x20000\nC\n%s\n\n", drv_let, st);
|
||||
XTalkWait(task, "BootHDIns('%C');\n\nB\n0x20000\nC\n%s\n\n", drv_let, port_st);
|
||||
VideoRep;
|
||||
res_num = I64Get("Enter desired list num ($$PURPLE$$<ENTER>$$FG$$ for max res): ",, 1);
|
||||
XTalkWait(task, "%d\n\n\n", res_num); //skip through Disk Cache, Options
|
||||
|
|
Loading…
Reference in a new issue