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
7070 int kmsg_dump_register(struct kmsg_dumper *dumper);
7171
7272 int kmsg_dump_unregister(struct kmsg_dumper *dumper);
73+
74+const char *kmsg_dump_reason_str(enum kmsg_dump_reason reason);
7375 #else
7476 static inline void kmsg_dump(enum kmsg_dump_reason reason)
7577 {
@@ -111,6 +113,11 @@ static inline int kmsg_dump_unregister(struct kmsg_dumper *dumper) · 35 unmodified lines
111113 {
112114 return -EINVAL;
113115 }
116+
117+static inline const char *kmsg_dump_reason_str(enum kmsg_dump_reason reason)
118+{
119+ return "Disabled";
120+}
114121 #endif
115122
116123 #endif /* _LINUX_KMSG_DUMP_H */