projects/linux·commit 197dcffc

init/version.c: define version_string only if CONFIG_KALLSYMS is not defined

197dcffc · Daniel Guilak <[email protected]> · 2008-07-25 01:45:50 -07:00

int Version_* is only used with ksymoops, which is only needed (according
to README and Documentation/Changes) if CONFIG_KALLSYMS is NOT defined.
Therefore this patch defines version_string only if CONFIG_KALLSYMS is not
defined.

Signed-off-by: Daniel Guilak <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
197dcffc8ba0ea943fee86e28e99cd9575799772
Parents
277e2c69

Changes

1 files changed · +2 −0

FileStatusAddDelContent
init/version.cmodified+2−0View file

init/version.c

View file
diff --git a/init/version.c b/init/version.c
index 041fd82..52a8b98 100644
--- a/init/version.c
+++ b/init/version.c
@@ -13,11 +13,13 @@
#include <linux/utsrelease.h>
#include <linux/version.h>
+#ifndef CONFIG_KALLSYMS
#define version(a) Version_ ## a
#define version_string(a) version(a)
extern int version_string(LINUX_VERSION_CODE);
int version_string(LINUX_VERSION_CODE);
+#endif
struct uts_namespace init_uts_ns = {
.kref = {