diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-04 07:09:18 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-07 23:00:55 +0100 |
commit | 125cc42baf8ab2149c207f8a360ea25668b8422d (patch) | |
tree | 85bd4128f1e633e4d611477da9fba6f98fb44940 /include/linux/pstore.h | |
parent | pstore: Switch pstore_mkfile to pass record (diff) | |
download | linux-125cc42baf8ab2149c207f8a360ea25668b8422d.tar.xz linux-125cc42baf8ab2149c207f8a360ea25668b8422d.zip |
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.h | 20 |
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, |