summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/umid.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-05-17 20:14:57 +0300
committerRichard Weinberger <richard@nod.at>2017-07-06 00:16:44 +0300
commite03c78ac2d7709b7556a9b8dd584e2969c6fce67 (patch)
tree8904cec3431d52001b10028c7f865f0db1b4ee6a /arch/um/os-Linux/umid.c
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
downloadlinux-e03c78ac2d7709b7556a9b8dd584e2969c6fce67.tar.xz
um: Use printk instead of printf in make_uml_dir
Since this function will be called after printk buffer initialized, use printk as other functions do. 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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index c1dc89261f67..37cfaba47aa6 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -35,8 +35,9 @@ static int __init make_uml_dir(void)
err = -ENOENT;
if (home == NULL) {
- printk(UM_KERN_ERR "make_uml_dir : no value in "
- "environment for $HOME\n");
+ printk(UM_KERN_ERR
+ "%s: no value in environment for $HOME\n",
+ __func__);
goto err;
}
strlcpy(dir, home, sizeof(dir));
@@ -50,13 +51,15 @@ static int __init make_uml_dir(void)
err = -ENOMEM;
uml_dir = malloc(strlen(dir) + 1);
if (uml_dir == NULL) {
- printf("make_uml_dir : malloc failed, errno = %d\n", errno);
+ printk(UM_KERN_ERR "%s : malloc failed, errno = %d\n",
+ __func__, errno);
goto err;
}
strcpy(uml_dir, dir);
if ((mkdir(uml_dir, 0777) < 0) && (errno != EEXIST)) {
- printf("Failed to mkdir '%s': %s\n", uml_dir, strerror(errno));
+ printk(UM_KERN_ERR "Failed to mkdir '%s': %s\n",
+ uml_dir, strerror(errno));
err = -errno;
goto err_free;
}