summaryrefslogtreecommitdiff
path: root/kernel/drivers/ata.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-17 22:07:38 +0200
committerAnton Kling <anton@kling.gg>2024-06-17 22:07:38 +0200
commitf209faffab90186cd88cd0a2fe2cc6236bb53e15 (patch)
tree68194363c25900f5d349c8ae34d42be9ae638df8 /kernel/drivers/ata.c
parent08d0b7eee74b9f345241faad460d145bb0454736 (diff)
Reorganize logging code
Diffstat (limited to 'kernel/drivers/ata.c')
-rw-r--r--kernel/drivers/ata.c8
1 files changed, 4 insertions, 4 deletions
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