commands: rksecure: use printf for command errors pr_err is logged, may be shared with Linux via pstore and outputs to stderr, which may point at a different console or be hidden by log level setting.
printf on the other hand is not logged, uses stdout and is thus the correct function to use to output, regular or error, in commands. Signed-off-by: Ahmad Fatoum <[email protected]> --- commands/rksecure.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/rksecure.c b/commands/rksecure.c index e0c20f75fcec..81b4f1a62860 100644 --- a/commands/rksecure.c +++ b/commands/rksecure.c @@ -17,14 +17,14 @@ static int rksecure_write_hash_hex(const char *hex, u32 key_size_bits) u8 digest[SHA256_DIGEST_SIZE]; if (strlen(hex) != SHA256_DIGEST_SIZE * 2) { - pr_err("%s has wrong size: Expected %d characters\n", + printf("%s has wrong size: Expected %d characters\n", hex, SHA256_DIGEST_SIZE * 2); return -EINVAL; } ret = hex2bin(digest, hex, SHA256_DIGEST_SIZE); if (ret < 0) { - pr_err("Failed to parse hash %s\n", hex); + printf("Failed to parse hash %s\n", hex); return -EINVAL; } @@ -41,7 +41,7 @@ static int rksecure_write_hash_file(const char *filename, u32 key_size_bits) if (ret) return ret; if (size != SHA256_DIGEST_SIZE) { - pr_err("%s has wrong size: Expected %d bytes\n", + printf("%s has wrong size: Expected %d bytes\n", filename, SHA256_DIGEST_SIZE); return -EINVAL; } @@ -60,7 +60,7 @@ static int rksecure_print_info(void) ret = rk_secure_boot_get_info(&info); if (ret) { - pr_err("Failed to read secure boot info\n"); + printf("Failed to read secure boot info\n"); return ret; } -- 2.47.3
