From f209faffab90186cd88cd0a2fe2cc6236bb53e15 Mon Sep 17 00:00:00 2001 From: Anton Kling <anton@kling.gg> Date: Mon, 17 Jun 2024 22:07:38 +0200 Subject: Reorganize logging code --- kernel/drivers/ata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel/drivers/ata.c') diff --git a/kernel/drivers/ata.c b/kernel/drivers/ata.c index 0537f6e..9116da9 100644 --- a/kernel/drivers/ata.c +++ b/kernel/drivers/ata.c @@ -56,7 +56,7 @@ int identify(int master_slave) { // non-zero. If so, the drive is not ATA, and we // should stop polling. if (0 != inb(io_base + LBAmid) || 0 != inb(io_base + LBAhi)) { - klog("Drive is not ATA.", LOG_ERROR); + klog(LOG_ERROR, "Drive is not ATA."); return -1; } @@ -64,7 +64,7 @@ int identify(int master_slave) { status = inb(io_base + STATUS_PORT); if (1 == (status & STATUS_ERR)) { - klog("Drive ERR set.", LOG_ERROR); + klog(LOG_ERROR, "Drive ERR set."); return -2; } @@ -95,7 +95,7 @@ int poll_status(void) { // ERR or // DF sets if ((status & STATUS_ERR) || (status & STATUS_DF)) { - klog("Drive error set.", LOG_ERROR); + klog(LOG_ERROR, "Drive error set."); return 0; } @@ -205,7 +205,7 @@ void ata_init(void) { // 0xFF is an illegal status value, and // indicates that the bus has no drives if (0xFF == inb(io_base + STATUS_PORT)) { - klog("Bus has no drives", LOG_ERROR); + klog(LOG_ERROR, "Bus has no drives"); } // Issue IDENTIFY command -- cgit v1.2.3