path: root/fs
diff options
authorKees Cook <>2019-03-15 10:14:50 +0100
committerSascha Hauer <>2019-03-18 09:43:35 +0100
commitda9b86ec0fbec0eb60646e7a3c700076a423717d (patch)
treeb02494d4d3cae4612abf060cc552ac81d833a075 /fs
parentcdce7a569c947878708695bcdc383dbcc192c099 (diff)
pstore: Replace arguments for write() API
Similar to the pstore_info read() callback, there were too many arguments. This switches to the new struct pstore_record pointer instead. This adds "reason" and "part" to the record structure as well. Signed-off-by: Kees Cook <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'fs')
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 54fe60b..755363c 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -115,14 +115,12 @@ static void pstore_register_console(void)
static void pstore_register_console(void) {}
-static int pstore_write_compat(enum pstore_type_id type,
- enum kmsg_dump_reason reason,
- u64 *id, unsigned int part, int count,
- bool compressed, size_t size,
- struct pstore_info *psi)
+static int pstore_write_compat(struct pstore_record *record)
- return psi->write_buf(type, reason, id, part, psinfo->buf, compressed,
- size, psi);
+ return record->psi->write_buf(record->type, record->reason,
+ &record->id, record->part,
+ psinfo->buf, record->compressed,
+ record->size, record->psi);