diff --git a/sysdata/programs/diskio_driver/src/main.hb b/sysdata/programs/diskio_driver/src/main.hb index 844bf53d..eb9a3a9c 100644 --- a/sysdata/programs/diskio_driver/src/main.hb +++ b/sysdata/programs/diskio_driver/src/main.hb @@ -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()