diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:03:02 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:03:02 -0500 |
| commit | 6ed23fd6c08b3ffa17c1f841098d2fa2ab3a59dd (patch) | |
| tree | 5cb5bb5dbefbb6458eff4bdae3c091ca3c02d685 /include/linux | |
| parent | 5ee354a0295c34aa7da07be8490f86edee2c7883 (diff) | |
| parent | 2174f6df7891fa331800beb72634c969f017900b (diff) | |
Merge branch 'pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
* 'pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
pstore: gracefully handle NULL pstore_info functions
pstore: pass reason to backend write callback
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pstore.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 2ca8cde5459d..e1461e143be2 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | #ifndef _LINUX_PSTORE_H | 22 | #ifndef _LINUX_PSTORE_H |
| 23 | #define _LINUX_PSTORE_H | 23 | #define _LINUX_PSTORE_H |
| 24 | 24 | ||
| 25 | #include <linux/time.h> | ||
| 26 | #include <linux/kmsg_dump.h> | ||
| 27 | |||
| 25 | /* types */ | 28 | /* types */ |
| 26 | enum pstore_type_id { | 29 | enum pstore_type_id { |
| 27 | PSTORE_TYPE_DMESG = 0, | 30 | PSTORE_TYPE_DMESG = 0, |
| @@ -41,7 +44,8 @@ struct pstore_info { | |||
| 41 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, | 44 | ssize_t (*read)(u64 *id, enum pstore_type_id *type, |
| 42 | struct timespec *time, char **buf, | 45 | struct timespec *time, char **buf, |
| 43 | struct pstore_info *psi); | 46 | struct pstore_info *psi); |
| 44 | int (*write)(enum pstore_type_id type, u64 *id, | 47 | int (*write)(enum pstore_type_id type, |
| 48 | enum kmsg_dump_reason reason, u64 *id, | ||
| 45 | unsigned int part, size_t size, struct pstore_info *psi); | 49 | unsigned int part, size_t size, struct pstore_info *psi); |
| 46 | int (*erase)(enum pstore_type_id type, u64 id, | 50 | int (*erase)(enum pstore_type_id type, u64 id, |
| 47 | struct pstore_info *psi); | 51 | struct pstore_info *psi); |
| @@ -50,18 +54,12 @@ struct pstore_info { | |||
| 50 | 54 | ||
| 51 | #ifdef CONFIG_PSTORE | 55 | #ifdef CONFIG_PSTORE |
| 52 | extern int pstore_register(struct pstore_info *); | 56 | extern int pstore_register(struct pstore_info *); |
| 53 | extern int pstore_write(enum pstore_type_id type, char *buf, size_t size); | ||
| 54 | #else | 57 | #else |
| 55 | static inline int | 58 | static inline int |
| 56 | pstore_register(struct pstore_info *psi) | 59 | pstore_register(struct pstore_info *psi) |
| 57 | { | 60 | { |
| 58 | return -ENODEV; | 61 | return -ENODEV; |
| 59 | } | 62 | } |
| 60 | static inline int | ||
| 61 | pstore_write(enum pstore_type_id type, char *buf, size_t size) | ||
| 62 | { | ||
| 63 | return -ENODEV; | ||
| 64 | } | ||
| 65 | #endif | 63 | #endif |
| 66 | 64 | ||
| 67 | #endif /*_LINUX_PSTORE_H*/ | 65 | #endif /*_LINUX_PSTORE_H*/ |
