Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447200

[PATCH 2/2] pstore/ram: Set pstore flags dynamically

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 2/2] pstore/ram: Set pstore flags dynamically
Date 2016-07-20 14:20 +0200
Message-ID <rWYDL-1iY-7@gated-at.bofh.it> (permalink)
References <rWYDL-1iY-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The ramoops can be configured to enable each pstore type by setting
their size.  In that case, it'd be better not to register disabled types
in the first place.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 fs/pstore/ram.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index d08bfd611b11..80a4d44464fc 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -539,7 +539,13 @@ static int ramoops_probe(struct platform_device *pdev)
 		goto fail_clear;
 	}
 
-	cxt->pstore.flags = PSTORE_FLAGS_ALL;
+	cxt->pstore.flags = PSTORE_FLAGS_DMESG;
+	if (ctx->console_size)
+		cxt->pstore.flags |= PSTORE_FLAGS_CONOLE;
+	if (ctx->ftrace_size)
+		cxt->pstore.flags |= PSTORE_FLAGS_FTRACE;
+	if (ctx->pmsg_size)
+		cxt->pstore.flags |= PSTORE_FLAGS_PMSG;
 
 	err = pstore_register(&cxt->pstore);
 	if (err) {
-- 
2.8.0

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] pstore: Split pstore fragile flags Namhyung Kim <namhyung@kernel.org> - 2016-07-20 14:20 +0200
  [PATCH 2/2] pstore/ram: Set pstore flags dynamically Namhyung Kim <namhyung@kernel.org> - 2016-07-20 14:20 +0200
  [PATCH v2 1/2] pstore: Split pstore fragile flags Namhyung Kim <namhyung@kernel.org> - 2016-07-20 16:30 +0200
    Re: [PATCH v2 1/2] pstore: Split pstore fragile flags Kees Cook <keescook@chromium.org> - 2016-07-20 19:50 +0200

csiph-web