OSDN Git Service

pstore/ram: Add ramoops_console_write_buf api
authorArve Hjønnevåg <arve@android.com>
Sat, 3 May 2014 03:23:21 +0000 (20:23 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 13 Dec 2014 15:14:16 +0000 (23:14 +0800)
Allow writing into the ramoops console buffer.

Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47
Signed-off-by: Arve Hjønnevåg <arve@android.com>
fs/pstore/ram.c
include/linux/pstore_ram.h

index 3b57443..1f5420e 100644 (file)
@@ -404,6 +404,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;
index 9974975..9e37061 100644 (file)
@@ -67,6 +67,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