aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kmsg_dump.h
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2009-12-01 10:52:02 -0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-12-02 08:44:33 +0000
commit595dd3d8bf953254d8d2f30f99c54fe09c470040 (patch)
treef7a1d6c8ccb2e32f4fdf7e04a6a6ba8cfe0acc0c /include/linux/kmsg_dump.h
parentmtd: nandsim: add support for 4KiB pages (diff)
downloadlinux-dev-595dd3d8bf953254d8d2f30f99c54fe09c470040.tar.xz
linux-dev-595dd3d8bf953254d8d2f30f99c54fe09c470040.zip
kmsg_dump: fix build for CONFIG_PRINTK=n
kmsg_dump() fails to build when CONFIG_PRINTK=n; provide stubs for the kmsg_dump*() functions when CONFIG_PRINTK=n. kernel/printk.c: In function 'kmsg_dump': kernel/printk.c:1501: error: 'log_buf_len' undeclared (first use in this function) kernel/printk.c:1502: error: 'logged_chars' undeclared (first use in this function) kernel/printk.c:1506: error: 'log_buf' undeclared (first use in this function) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/kmsg_dump.h')
-rw-r--r--include/linux/kmsg_dump.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h
index 7f089ec5ef32..e32aa268efac 100644
--- a/include/linux/kmsg_dump.h
+++ b/include/linux/kmsg_dump.h
@@ -35,10 +35,26 @@ struct kmsg_dumper {
int registered;
};
+#ifdef CONFIG_PRINTK
void kmsg_dump(enum kmsg_dump_reason reason);
int kmsg_dump_register(struct kmsg_dumper *dumper);
int kmsg_dump_unregister(struct kmsg_dumper *dumper);
+#else
+static inline void kmsg_dump(enum kmsg_dump_reason reason)
+{
+}
+
+static inline int kmsg_dump_register(struct kmsg_dumper *dumper)
+{
+ return -EINVAL;
+}
+
+static inline int kmsg_dump_unregister(struct kmsg_dumper *dumper)
+{
+ return -EINVAL;
+}
+#endif
#endif /* _LINUX_KMSG_DUMP_H */