diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-07-31 12:20:29 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-07-31 12:20:29 +0200 |
commit | bb272221e9db79f13d454e1f3fb6b05013be985e (patch) | |
tree | 36f4acc50e3fabac71fadd34c720c0a6011db470 /arch/um/os-Linux/util.c | |
parent | powerpc/powernv/pci: Return failure for some uses of dma_set_mask() (diff) | |
parent | Linux v4.13-rc1 (diff) | |
download | linux-bb272221e9db79f13d454e1f3fb6b05013be985e.tar.xz linux-bb272221e9db79f13d454e1f3fb6b05013be985e.zip |
Merge tag 'v4.13-rc1' into fixes
The fixes branch is based off a random pre-rc1 commit, because we had
some fixes that needed to go in before rc1 was released.
However we now need to fix some code that went in after that point, but
before rc1, so merge rc1 to get that code into fixes so we can fix it!
Diffstat (limited to 'arch/um/os-Linux/util.c')
-rw-r--r-- | arch/um/os-Linux/util.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index faee55ef6d2f..8cc8b2617a67 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c @@ -13,6 +13,7 @@ #include <wait.h> #include <sys/mman.h> #include <sys/utsname.h> +#include <init.h> #include <os.h> void stack_protections(unsigned long address) @@ -152,3 +153,36 @@ void um_early_printk(const char *s, unsigned int n) { printf("%.*s", n, s); } + +static int quiet_info; + +static int __init quiet_cmd_param(char *str, int *add) +{ + quiet_info = 1; + return 0; +} + +__uml_setup("quiet", quiet_cmd_param, +"quiet\n" +" Turns off information messages during boot.\n\n"); + +void os_info(const char *fmt, ...) +{ + va_list list; + + if (quiet_info) + return; + + va_start(list, fmt); + vfprintf(stderr, fmt, list); + va_end(list); +} + +void os_warn(const char *fmt, ...) +{ + va_list list; + + va_start(list, fmt); + vfprintf(stderr, fmt, list); + va_end(list); +} |