summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-29 22:09:17 -0500
committerIan Moffett <ian@osmora.org>2024-02-29 22:09:17 -0500
commit69acd1f2cfdbf7ded636a8ec098a1dcc86fecdb0 (patch)
tree39a6faa27aac1fba47a9debbbb9f06bb431689cc /sys/arch
parent2a9d7b9cc5f82eb60b295e4a689ac20f27dd65cb (diff)
kernel/amd64: trap: Simplify trap_print() logic
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/trap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index 703b6cf..cbcf730 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -52,15 +52,11 @@ static const int TRAP_COUNT = __ARRAY_COUNT(trap_type);
static void
trap_print(struct trapframe *tf)
{
- const char *mode;
-
if (tf->trapno < TRAP_COUNT) {
- kprintf("** Fatal %s", trap_type[tf->trapno]);
+ kprintf("** Fatal %s **\n", trap_type[tf->trapno]);
} else {
- kprintf("** Unknown trap %d", tf->trapno);
+ kprintf("** Unknown trap %d **\n", tf->trapno);
}
- mode = __TEST(tf->trapno, TRAP_USER) ? "user" : "supervisor";
- kprintf(" in %s mode **\n", mode);
}
static void