aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/pstore.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-05-19 15:29:10 -0700
committerKees Cook <keescook@chromium.org>2017-05-31 10:13:44 -0700
commitc7f3c595f6ff7a1cfbf7ac782722bf5173e27775 (patch)
tree7adaa468343cb5d9a45ce738d1fee91ca22dc489 /include/linux/pstore.h
parentpstore: Create common record initializer (diff)
downloadwireguard-linux-c7f3c595f6ff7a1cfbf7ac782722bf5173e27775.tar.xz
wireguard-linux-c7f3c595f6ff7a1cfbf7ac782722bf5173e27775.zip
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>
Diffstat (limited to 'include/linux/pstore.h')
-rw-r--r--include/linux/pstore.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index e2233f50f428..61f806a7fe29 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -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.
*