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>
This commit is contained in:
Kees Cook
2017-03-03 22:09:18 -08:00
parent 1edd1aa397
commit 125cc42baf
6 changed files with 124 additions and 159 deletions

View File

@@ -807,12 +807,7 @@ void pstore_get_records(int quiet)
if (psi->open && psi->open(psi))
goto out;
while ((record.size = psi->read(&record.id, &record.type,
&record.count, &record.time,
&record.buf, &record.compressed,
&record.ecc_notice_size,
record.psi)) > 0) {
while ((record.size = psi->read(&record)) > 0) {
decompress_record(&record);
rc = pstore_mkfile(&record);