forked from AbleOS/ableos
minor patch to make things more clear
This commit is contained in:
parent
635ed1be42
commit
883c01b2ba
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue