1
0
Fork 0
forked from AbleOS/ableos

minor patch to make things more clear

This commit is contained in:
Able 2024-12-05 11:02:48 -06:00
parent 635ed1be42
commit 883c01b2ba

View file

@ -36,18 +36,22 @@ identify := fn(): u8 {
log.info("Waiting for status.\0")
loop {
if (status & STAT_BSY) == 0 {
log.info("Status got.\0")
break
} else {
sloop()
}
status = inb(ATA_PRIMARY_COMM_REGSTAT)
}
log.info("Status got\0")
if status == 0 return 0
if status == 0 {
log.error("No drive detected.\0")
return 0
}
log.info("Status indicates presence of a drive. Polling while STAT_BSY... \0")
loop {
if (status & STAT_BSY) == 0 {
log.info("Status got.\0")
break
} else {
sloop()