Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75923a6f authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by John Stultz
Browse files

pstore/ram: Add ramoops_console_write_buf api



Allow writing into the ramoops console buffer.

Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47
Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
parent 57295ca6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -458,6 +458,12 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
	return 0;
}

void notrace ramoops_console_write_buf(const char *buf, size_t size)
{
	struct ramoops_context *cxt = &oops_cxt;
	persistent_ram_write(cxt->cprz, buf, size);
}

static int ramoops_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz);
ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
	char *str, size_t len);

void ramoops_console_write_buf(const char *buf, size_t size);

/*
 * Ramoops platform data
 * @mem_size	memory size for ramoops