summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-03-15 10:14:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-18 09:43:35 +0100
commit114d41b69c1e0715fe09b2234559f545eb7721bf (patch)
tree07d3c3bcd26d1fdcbfb73fb9522a3c2840882ab9 /include
parent34e46e5863fbf24af9b81bf5330d7301c9f58260 (diff)
downloadbarebox-114d41b69c1e0715fe09b2234559f545eb7721bf.tar.gz
barebox-114d41b69c1e0715fe09b2234559f545eb7721bf.tar.xz
pstore: Extract common arguments into structure
The read/mkfile pair pass the same arguments and should be cleared between calls. Move to a structure and wipe it after every loop. Signed-off-by: Kees Cook <keescook@chromium.org> [p.zabel@pengutronix.de: ported to Barebox from Linux commit 9abdcccc3d5f] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pstore.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index a925e14397..23f35570aa 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -25,6 +25,8 @@
#include <linux/types.h>
#include <asm-generic/errno.h>
+struct module;
+
/* types */
enum pstore_type_id {
PSTORE_TYPE_DMESG = 0,
@@ -43,7 +45,18 @@ enum kmsg_dump_reason {
KMSG_DUMP_UNDEF,
};
-struct module;
+struct pstore_info;
+
+struct pstore_record {
+ struct pstore_info *psi;
+ enum pstore_type_id type;
+ u64 id;
+ char *buf;
+ int count;
+ bool compressed;
+ ssize_t size;
+ ssize_t ecc_notice_size;
+};
struct pstore_info {
struct module *owner;