]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/um/os-Linux/util.c
Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / arch / um / os-Linux / util.c
index faee55ef6d2f4954aa9770c2d8985554e40797d7..8cc8b2617a670cc3f6ba475c07c21e62f2f37bd4 100644 (file)
@@ -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);
+}