--- zzzz-none-000/linux-5.4.213/include/linux/pstore.h 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/include/linux/pstore.h 2024-08-14 09:02:08.000000000 +0000 @@ -96,6 +96,7 @@ * * @read_mutex: serializes @open, @read, @close, and @erase callbacks * @flags: bitfield of frontends the backend can accept writes for + * @num_pmsg: amount of pmsg instances * @data: backend-private pointer passed back during callbacks * * Callbacks: @@ -179,6 +180,7 @@ struct mutex read_mutex; int flags; + unsigned int num_pmsg; void *data; int (*open)(struct pstore_info *psi); @@ -187,6 +189,8 @@ int (*write)(struct pstore_record *record); int (*write_user)(struct pstore_record *record, const char __user *buf); + ssize_t (*copy)(enum pstore_type_id type, u64 id, void **buf, + struct pstore_info *psi); int (*erase)(struct pstore_record *record); }; @@ -275,4 +279,6 @@ } #endif +#define pstore_copy pstore_copy +extern ssize_t pstore_copy(enum pstore_type_id type, u64 id, void **buf); #endif /*_LINUX_PSTORE_H*/