[PATCH v2 2/3] commands: test: replace printf with pr_err
Marco Felsch
m.felsch at pengutronix.de
Tue Jul 4 04:29:20 PDT 2023
Replace the printf() with pr_err() to support:
- color formated prints
- logbuffer storing (dmesg)
- loglevels
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
v2:
- new patch
commands/test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commands/test.c b/commands/test.c
index c1b84c42ef..5478011185 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -77,7 +77,7 @@ static int do_test(int argc, char *argv[])
if (*argv[0] == '[') {
argc--;
if (*argv[argc] != ']') {
- printf("[: missing `]'\n");
+ pr_err("[: missing `]'\n");
return 1;
}
}
@@ -213,7 +213,7 @@ static int do_test(int argc, char *argv[])
}
if (left < adv) {
- printf("test: failed to parse arguments\n");
+ pr_err("test: failed to parse arguments\n");
return 1;
}
--
2.39.2
More information about the barebox
mailing list