diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2017-05-17 20:19:31 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2017-07-06 00:18:25 +0300 |
commit | 0936d4f3d5a3d5daf453bc341f02ba4e68cfe40e (patch) | |
tree | 494fd5cbbfe856c4677abf14b717313da76c2819 /arch/um/os-Linux/umid.c | |
parent | 721ccae88d04f7e9334fde4cbb3eecfaa70a31ac (diff) | |
download | linux-0936d4f3d5a3d5daf453bc341f02ba4e68cfe40e.tar.xz |
um: Use os_warn to print out pre-boot warning/error messages
Use os_warn() instead of printf/fprintf to print out
pre-boot warning/error messages to stderr.
Note that the help message and version message are
kept to print out to stdout, because user explicitly
specifies those options to get such information.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux/umid.c')
-rw-r--r-- | arch/um/os-Linux/umid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 37cfaba47aa6..998fbb445458 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c @@ -354,7 +354,7 @@ char *get_umid(void) static int __init set_uml_dir(char *name, int *add) { if (*name == '\0') { - printf("uml_dir can't be an empty string\n"); + os_warn("uml_dir can't be an empty string\n"); return 0; } @@ -365,7 +365,7 @@ static int __init set_uml_dir(char *name, int *add) uml_dir = malloc(strlen(name) + 2); if (uml_dir == NULL) { - printf("Failed to malloc uml_dir - error = %d\n", errno); + os_warn("Failed to malloc uml_dir - error = %d\n", errno); /* * Return 0 here because do_initcalls doesn't look at @@ -390,8 +390,8 @@ static void remove_umid_dir(void) sprintf(dir, "%s%s", uml_dir, umid); err = remove_files_and_dir(dir); if (err) - printf("remove_umid_dir - remove_files_and_dir failed with " - "err = %d\n", err); + os_warn("%s - remove_files_and_dir failed with err = %d\n", + __func__, err); } __uml_exitcall(remove_umid_dir); |