History

printk: Introduce kmsg_dump_reason_str()

The pstore subsystem already had a private version of this function. With the coming addition of the pstore/zone driver, this needs to be shared. As it really should live with printk, move it there instead.

Kees Cook committed 6 years ago

Commit fb13cb81 parent b1f6f163 files · +25 −17Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/kmsg_dump.h+7−0
@@ -70,6 +70,8 @@ void kmsg_dump_rewind(struct kmsg_dumper *dumper); · 69 unmodified lines
70int kmsg_dump_register(struct kmsg_dumper *dumper);70int kmsg_dump_register(struct kmsg_dumper *dumper);
71 71
72int kmsg_dump_unregister(struct kmsg_dumper *dumper);72int kmsg_dump_unregister(struct kmsg_dumper *dumper);
73
74const char *kmsg_dump_reason_str(enum kmsg_dump_reason reason);
73#else75#else
74static inline void kmsg_dump(enum kmsg_dump_reason reason)76static inline void kmsg_dump(enum kmsg_dump_reason reason)
75{77{
@@ -111,6 +113,11 @@ static inline int kmsg_dump_unregister(struct kmsg_dumper *dumper) · 35 unmodified lines
111{113{
112 return -EINVAL;114 return -EINVAL;
113}115}
116
117static inline const char *kmsg_dump_reason_str(enum kmsg_dump_reason reason)
118{
119 return "Disabled";
120}
114#endif121#endif
115 122
116#endif /* _LINUX_KMSG_DUMP_H */123#endif /* _LINUX_KMSG_DUMP_H */