summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-09-20 02:28:53 -0400
committersigsegv7 <ian@vegaa.systems>2023-09-20 02:28:53 -0400
commitc5a04a0150c9e92dc0b00da326aad77ac25fd485 (patch)
tree74403739a4a5a203096d5de35c3de1c2a81ee962 /sys
parent808baf43a580596f1677663bafd6844118680c5a (diff)
kernel: dev: Use errno.h error codes
This commit makes the hpet_sleep() function return either EXIT_SUCCESS or EXIT_FAILURE instead of hardcoded constants. Signed-off-by: sigsegv7 <ian@vegaa.systems>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/timer/hpet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/timer/hpet.c b/sys/dev/timer/hpet.c
index f5b1621..08c4432 100644
--- a/sys/dev/timer/hpet.c
+++ b/sys/dev/timer/hpet.c
@@ -32,6 +32,7 @@
#include <sys/panic.h>
#include <sys/cdefs.h>
#include <sys/timer.h>
+#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/mmio.h>
@@ -107,7 +108,7 @@ hpet_sleep(uint64_t n, uint64_t units)
/* Don't even try if faulty, would probably cause deadlock */
if (is_faulty) {
- return 1;
+ return EXIT_FAILURE;
}
caps = hpet_read(HPET_REG_CAPS);
@@ -120,7 +121,7 @@ hpet_sleep(uint64_t n, uint64_t units)
spinwait_hint();
}
- return 0;
+ return EXIT_SUCCESS;
}
int