mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
75352662c5
commit
595dd3d8bf
2 changed files with 17 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue