ALSA: core: Fix double-free at snd_card_new()
[linux-2.6-microblaze.git] / init / version.c
index 92afc78..b7f9559 100644 (file)
@@ -9,7 +9,10 @@
 
 #include <generated/compile.h>
 #include <linux/build-salt.h>
+#include <linux/elfnote-lto.h>
 #include <linux/export.h>
+#include <linux/init.h>
+#include <linux/printk.h>
 #include <linux/uts.h>
 #include <linux/utsname.h>
 #include <generated/utsrelease.h>
@@ -34,6 +37,21 @@ struct uts_namespace init_uts_ns = {
 };
 EXPORT_SYMBOL_GPL(init_uts_ns);
 
+static int __init early_hostname(char *arg)
+{
+       size_t bufsize = sizeof(init_uts_ns.name.nodename);
+       size_t maxlen  = bufsize - 1;
+       size_t arglen;
+
+       arglen = strlcpy(init_uts_ns.name.nodename, arg, bufsize);
+       if (arglen > maxlen) {
+               pr_warn("hostname parameter exceeds %zd characters and will be truncated",
+                       maxlen);
+       }
+       return 0;
+}
+early_param("hostname", early_hostname);
+
 /* FIXED STRINGS! Don't touch! */
 const char linux_banner[] =
        "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
@@ -45,3 +63,4 @@ const char linux_proc_banner[] =
        " (" LINUX_COMPILER ") %s\n";
 
 BUILD_SALT;
+BUILD_LTO_INFO;