summaryrefslogtreecommitdiff
path: root/include/linux/pstore.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-03 22:09:18 -0800
committerKees Cook <keescook@chromium.org>2017-03-07 14:00:55 -0800
commit125cc42baf8ab2149c207f8a360ea25668b8422d (patch)
tree85bd4128f1e633e4d611477da9fba6f98fb44940 /include/linux/pstore.h
parent1edd1aa397ad3ca5f1fca1961c13910ef53f16e8 (diff)
pstore: Replace arguments for read() API
The argument list for the pstore_read() interface is unwieldy. This changes passes the new struct pstore_record instead. The erst backend was already doing something similar internally. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/pstore.h')
-rw-r--r--include/linux/pstore.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index 745468072d6e..22a46ebbe041 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -111,16 +111,11 @@ struct pstore_record {
* Read next available backend record. Called after a successful
* @open.
*
- * @id: out: unique identifier for the record
- * @type: out: pstore record type
- * @count: out: for PSTORE_TYPE_DMESG, the Oops count.
- * @time: out: timestamp for the record
- * @buf: out: kmalloc copy of record contents, to be freed by pstore
- * @compressed:
- * out: if the record contents are compressed
- * @ecc_notice_size:
- * out: ECC information
- * @psi: in: pointer to the struct pstore_info for the backend
+ * @record:
+ * pointer to record to populate. @buf should be allocated
+ * by the backend and filled. At least @type and @id should
+ * be populated, since these are used when creating pstorefs
+ * file names.
*
* Returns record size on success, zero when no more records are
* available, or negative on error.
@@ -207,10 +202,7 @@ struct pstore_info {
int (*open)(struct pstore_info *psi);
int (*close)(struct pstore_info *psi);
- ssize_t (*read)(u64 *id, enum pstore_type_id *type,
- int *count, struct timespec *time, char **buf,
- bool *compressed, ssize_t *ecc_notice_size,
- struct pstore_info *psi);
+ ssize_t (*read)(struct pstore_record *record);
int (*write)(enum pstore_type_id type,
enum kmsg_dump_reason reason, u64 *id,
unsigned int part, int count, bool compressed,