summaryrefslogtreecommitdiffstats
path: root/include/linux/pstore.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2011-11-17 13:13:29 -0800
committerTony Luck <tony.luck@intel.com>2011-11-17 13:13:29 -0800
commit3d6d8d20ec4fd3b256632edb373a9c504724b8a9 (patch)
tree6bb1a530bb50fcdb24a2db48d095480e741ae371 /include/linux/pstore.h
parentf6f8285132907757ef84ef8dae0a1244b8cde6ac (diff)
downloadop-kernel-dev-3d6d8d20ec4fd3b256632edb373a9c504724b8a9.zip
op-kernel-dev-3d6d8d20ec4fd3b256632edb373a9c504724b8a9.tar.gz
pstore: pass reason to backend write callback
This allows a backend to filter on the dmesg reason as well as the pstore reason. When ramoops is switched to pstore, this is needed since it has no interest in storing non-crash dmesg details. Drop pstore_write() as it has no users, and handling the "reason" here has no obviously correct value. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/pstore.h')
-rw-r--r--include/linux/pstore.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 2ca8cde..e1461e1 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -22,6 +22,9 @@
#ifndef _LINUX_PSTORE_H
#define _LINUX_PSTORE_H
+#include <linux/time.h>
+#include <linux/kmsg_dump.h>
+
/* types */
enum pstore_type_id {
PSTORE_TYPE_DMESG = 0,
@@ -41,7 +44,8 @@ struct pstore_info {
ssize_t (*read)(u64 *id, enum pstore_type_id *type,
struct timespec *time, char **buf,
struct pstore_info *psi);
- int (*write)(enum pstore_type_id type, u64 *id,
+ int (*write)(enum pstore_type_id type,
+ enum kmsg_dump_reason reason, u64 *id,
unsigned int part, size_t size, struct pstore_info *psi);
int (*erase)(enum pstore_type_id type, u64 id,
struct pstore_info *psi);
@@ -50,18 +54,12 @@ struct pstore_info {
#ifdef CONFIG_PSTORE
extern int pstore_register(struct pstore_info *);
-extern int pstore_write(enum pstore_type_id type, char *buf, size_t size);
#else
static inline int
pstore_register(struct pstore_info *psi)
{
return -ENODEV;
}
-static inline int
-pstore_write(enum pstore_type_id type, char *buf, size_t size)
-{
- return -ENODEV;
-}
#endif
#endif /*_LINUX_PSTORE_H*/
OpenPOWER on IntegriCloud