From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504AbbCZKNB (ORCPT ); Thu, 26 Mar 2015 06:13:01 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:3392 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123AbbCZKM6 (ORCPT ); Thu, 26 Mar 2015 06:12:58 -0400 From: Wang Long To: , , , CC: , , , , , , , Subject: [PATCH] fs/pstore: update the backend parameter in pstore module Date: Thu, 26 Mar 2015 10:08:54 +0000 Message-ID: <1427364534-136269-1-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.5513DACB.0095,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9bc5ff3251727acaa51ed9345377e3e5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch update the module parameter backend, so it is visible through /sys/module/pstore/parameters/backend. For example: if pstore backend is ramoops, with this patch: # cat /sys/module/pstore/parameters/backend ramoops and without this patch: # cat /sys/module/pstore/parameters/backend (null) Signed-off-by: Wang Long --- fs/pstore/platform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index c4c9a10..a52c218 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -456,6 +456,12 @@ int pstore_register(struct pstore_info *psi) add_timer(&pstore_timer); } + /* + * Update the module parameter backend, so it is visible + * through /sys/module/pstore/parameters/backend + */ + backend = psi->name; + pr_info("Registered %s as persistent store backend\n", psi->name); return 0; -- 1.8.3.4