X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Flinux%2Fpstore.h;h=9b169690013d36f8dd4dffa3261210e2ea5843e6;hp=ea567321ae3c3b2ac02967680f99de1687f99982;hb=53fd7f912c0877647d6a1e1877f5ea8535ee0b4a;hpb=ddddefa99db4ae54a63dcd737d224bc3cc0f2d8a diff --git a/include/linux/pstore.h b/include/linux/pstore.h index ea567321ae3c..9b169690013d 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h @@ -22,6 +22,8 @@ #ifndef _LINUX_PSTORE_H #define _LINUX_PSTORE_H +#include + /* types */ enum pstore_type_id { PSTORE_TYPE_DMESG = 0, @@ -35,10 +37,12 @@ struct pstore_info { spinlock_t buf_lock; /* serialize access to 'buf' */ char *buf; size_t bufsize; + struct mutex read_mutex; /* serialize open/read/close */ int (*open)(struct pstore_info *psi); int (*close)(struct pstore_info *psi); ssize_t (*read)(u64 *id, enum pstore_type_id *type, - struct timespec *time, struct pstore_info *psi); + struct timespec *time, char **buf, + struct pstore_info *psi); int (*write)(enum pstore_type_id type, u64 *id, unsigned int part, size_t size, struct pstore_info *psi); int (*erase)(enum pstore_type_id type, u64 id, @@ -48,6 +52,7 @@ struct pstore_info { #ifdef CONFIG_PSTORE extern int pstore_register(struct pstore_info *); +extern bool pstore_cannot_block_path(enum kmsg_dump_reason reason); extern int pstore_write(enum pstore_type_id type, char *buf, size_t size); #else static inline int @@ -55,6 +60,11 @@ pstore_register(struct pstore_info *psi) { return -ENODEV; } +static inline bool +pstore_cannot_block_path(enum kmsg_dump_reason reason) +{ + return false; +} static inline int pstore_write(enum pstore_type_id type, char *buf, size_t size) {