diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2017-05-18 02:17:14 +0900 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2017-07-05 23:17:42 +0200 |
commit | d3878bb8003009d148cd787e1a2d74cff914a7b2 (patch) | |
tree | 94e08d03649a6afb6169c9144ee83821ce6d73ff /arch/um/os-Linux/mem.c | |
parent | f7887ee11082b468517f31ae315b474eaa48b843 (diff) | |
download | lwn-d3878bb8003009d148cd787e1a2d74cff914a7b2.tar.gz lwn-d3878bb8003009d148cd787e1a2d74cff914a7b2.zip |
um: Use os_info for the messages on normal path
Use os_info() for printing out the messages on the
normal execution path.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux/mem.c')
-rw-r--r-- | arch/um/os-Linux/mem.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 8b1767668515..a7f6023301cd 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c @@ -25,13 +25,13 @@ static int __init check_tmpfs(const char *dir) { struct statfs st; - printf("Checking if %s is on tmpfs...", dir); + os_info("Checking if %s is on tmpfs...", dir); if (statfs(dir, &st) < 0) { - printf("%s\n", strerror(errno)); + os_info("%s\n", strerror(errno)); } else if (st.f_type != TMPFS_MAGIC) { - printf("no\n"); + os_info("no\n"); } else { - printf("OK\n"); + os_info("OK\n"); return 0; } return -1; @@ -61,18 +61,18 @@ static char * __init choose_tempdir(void) int i; const char *dir; - printf("Checking environment variables for a tempdir..."); + os_info("Checking environment variables for a tempdir..."); for (i = 0; vars[i]; i++) { dir = getenv(vars[i]); if ((dir != NULL) && (*dir != '\0')) { - printf("%s\n", dir); + os_info("%s\n", dir); if (check_tmpfs(dir) >= 0) goto done; else goto warn; } } - printf("none found\n"); + os_info("none found\n"); for (i = 0; tmpfs_dirs[i]; i++) { dir = tmpfs_dirs[i]; @@ -194,7 +194,7 @@ void __init check_tmpexec(void) addr = mmap(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); - printf("Checking PROT_EXEC mmap in %s...", tempdir); + os_info("Checking PROT_EXEC mmap in %s...", tempdir); if (addr == MAP_FAILED) { err = errno; printf("%s\n", strerror(err)); @@ -203,7 +203,7 @@ void __init check_tmpexec(void) printf("%s must be not mounted noexec\n", tempdir); exit(1); } - printf("OK\n"); + os_info("OK\n"); munmap(addr, UM_KERN_PAGE_SIZE); close(fd); |