pstore: Pass header size in the pstore write callback

Header size is needed to distinguish between header and the dump data.
Incorporate the addition of new argument (hsize) in the pstore write
callback.

Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Aruna Balakrishnaiah
2013-06-27 14:02:56 +05:30
committed by Benjamin Herrenschmidt
parent 74251fe21b
commit 6bbbca7359
6 changed files with 18 additions and 13 deletions

View File

@@ -502,6 +502,7 @@ static int nvram_pstore_open(struct pstore_info *psi)
* @part: pstore writes data to registered buffer in parts,
* part number will indicate the same.
* @count: Indicates oops count
* @hsize: Size of header added by pstore
* @size: number of bytes written to the registered buffer
* @psi: registered pstore_info structure
*
@@ -512,7 +513,8 @@ static int nvram_pstore_open(struct pstore_info *psi)
static int nvram_pstore_write(enum pstore_type_id type,
enum kmsg_dump_reason reason,
u64 *id, unsigned int part, int count,
size_t size, struct pstore_info *psi)
size_t hsize, size_t size,
struct pstore_info *psi)
{
int rc;
struct oops_log_info *oops_hdr = (struct oops_log_info *) oops_buf;