From 883c01b2ba8401897154f00fb411b4a4a6582adb Mon Sep 17 00:00:00 2001 From: Able Date: Thu, 5 Dec 2024 11:02:48 -0600 Subject: [PATCH] minor patch to make things more clear --- sysdata/programs/diskio_driver/src/main.hb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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()