Hello,

I have noticed certain fail() calls include newline. This does not seem
necessary since fail() is defined as
    printf(
        "seL4 called fail at %s:%u in function %s, saying \"%s\"\n",
        file,
        line,
        function,
        s
    );

Which causes affected error messages to contain a single " character on a
new line.

Patch attached.

Regards,
Eduard Nicodei
From e0bdb836b0a9b9d2a7835fdefaa7d51eeaa5f541 Mon Sep 17 00:00:00 2001
From: Eduard Nicodei <[email protected]>
Date: Thu, 18 Sep 2014 23:49:11 +0300
Subject: [PATCH] trivial: remove redundant newline in fail() calls.

---
 src/arch/arm/kernel/vspace.c    | 2 +-
 src/arch/ia32/kernel/boot_sys.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/arch/arm/kernel/vspace.c b/src/arch/arm/kernel/vspace.c
index cb6db5a..7c616de 100644
--- a/src/arch/arm/kernel/vspace.c
+++ b/src/arch/arm/kernel/vspace.c
@@ -2226,7 +2226,7 @@ doFlush(int label, vptr_t start, vptr_t end, paddr_t pstart)
         isb();
         break;
     default:
-        fail("Invalid operation, shouldn't get here.\n");
+        fail("Invalid operation, shouldn't get here.");
     }
 }
 
diff --git a/src/arch/ia32/kernel/boot_sys.c b/src/arch/ia32/kernel/boot_sys.c
index 5499d72..7cad07f 100644
--- a/src/arch/ia32/kernel/boot_sys.c
+++ b/src/arch/ia32/kernel/boot_sys.c
@@ -377,7 +377,7 @@ boot_node(void)
     bool_t result;
     result = try_boot_node();
     if (!result) {
-        fail("Failed to start node :(\n");
+        fail("Failed to start node :(");
     }
 }
 
@@ -621,7 +621,7 @@ boot_sys(
     result = try_boot_sys(multiboot_magic, mbi, apic_khz);
 
     if (!result) {
-        fail("boot_sys failed for some reason :(\n");
+        fail("boot_sys failed for some reason :(");
     }
 }
 
-- 
1.8.5.5

_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to