From e7fb1f97a5f95bcfd1d924b345f98bc0b496f5c0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 10 Feb 2021 20:28:16 +0100 Subject: Print to streams instead of serial console --- apps/init.c | 3 +-- apps/test.c | 4 ++-- apps/wm.c | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'apps') diff --git a/apps/init.c b/apps/init.c index 3cb4527..bb9a556 100644 --- a/apps/init.c +++ b/apps/init.c @@ -9,8 +9,7 @@ int main(int argc, char **argv) { (void)argc; - /* printf("ARGC: %d\n", argc); */ - /* printf("[%s loaded]\n", argv[0]); */ + log("%s loaded\n", argv[0]); int wm = exec("/bin/wm", "wm", argv[1], NULL); int exec = exec("/bin/exec", "test", NULL); diff --git a/apps/test.c b/apps/test.c index c47e060..101c215 100644 --- a/apps/test.c +++ b/apps/test.c @@ -24,8 +24,8 @@ void pass_or_fail(const char *file_name, int line_num, const char *func, const c const char *second, int success) { failed += success ? 0 : 1; - printf("\x1B[%s\x1B[0m %s:%d: %s: %s == %s\n", success ? "32m[PASS]" : "31m[FAIL]", - file_name, line_num, func, first, second); + log("\x1B[%s\x1B[0m %s:%d: %s: %s == %s\n", success ? "32m[PASS]" : "31m[FAIL]", file_name, + line_num, func, first, second); } void test_malloc() diff --git a/apps/wm.c b/apps/wm.c index b100770..c683020 100644 --- a/apps/wm.c +++ b/apps/wm.c @@ -264,7 +264,7 @@ int main(int argc, char **argv) (void)argc; int pid = getpid(); vbe = *(struct vbe *)argv[1]; - /* printf("VBE: %dx%d\n", vbe.width, vbe.height); */ + log("WM loaded: %dx%d\n", vbe.width, vbe.height); keymap = keymap_parse("/res/keymaps/en.keymap"); @@ -307,8 +307,7 @@ int main(int argc, char **argv) continue; } } else { - printf("POLL ERROR!\n"); - return 1; + err(1, "POLL ERROR!\n"); } switch (msg.type) { -- cgit v1.2.3