[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1469016646-5512-2-git-send-email-namhyung@kernel.org>
Date: Wed, 20 Jul 2016 21:10:46 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Kees Cook <keescook@...omium.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH 2/2] pstore/ram: Set pstore flags dynamically
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@...nel.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
Powered by blists - more mailing lists