pstore: Populate pstore record->time field

The current time will be initially available in the record->time field
for all pstore_read() and pstore_write() calls. Backends can either
update the field during read(), or use the field during write() instead
of fetching time themselves.

Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
Kees Cook 2017-05-19 15:29:10 -07:00
parent e581ca813a
commit c7f3c595f6
4 changed files with 15 additions and 15 deletions

View file

@ -138,7 +138,10 @@ struct pstore_record {
* memory allocation may be broken during an Oops. Regardless,
* @buf must be proccesed or copied before returning. The
* backend is also expected to write @id with something that
8 can help identify this record to a future @erase callback.
* can help identify this record to a future @erase callback.
* The @time field will be prepopulated with the current time,
* when available. The @size field will have the size of data
* in @buf.
*
* Returns 0 on success, and non-zero on error.
*